<template>
  <!-- 完善简历 -->
  <view
    class="box"
    @click=";(moreChage = false), (informationNoBubbles = false)"
    @touchstart="handleTouchStart"
    @touchmove="handleTouchMove"
    @touchend="handleTouchEnd"
  >
    <view class="dengLoadingVue" v-if="loding">
      <view class="maskVueHiddenShow">
        <view class="maskVueHiddenShowWrapper">
          <view class="loader">
            <view class="inner one"></view>
            <view class="inner two"></view>
            <view class="inner three"></view>
          </view>
          <view class="loding"> 数据加载中，请稍后... </view>
        </view>
      </view>
    </view>

    <view v-if="!loding">
      <view class="head">
        <view class="title">
          <image
            class="fanhui"
            @click.stop="goBack"
            src="https://pic.bangbangtongcheng.com/static/bbzc/left-btn.png"
            mode=""
          >
          </image>
          <view class="title-text">
            <span>完善简历</span>
            <navigator class="view-resume flex_center" url="/pages_recruitMoney/publish/viewResume?type=1"
              >预览简历</navigator
            >
          </view>
        </view>
      </view>

      <scroll-view
        ref="scrollView"
        class="main"
        scroll-y="true"
        :style="{ 'padding-top': isFixed ? '50rpx' : '0' }"
        :scroll-top="scrollTop"
        :scroll-into-view="scrollIntoViewId"
        scroll-with-animation
        @scroll="handleScroll"
      >
        <view class="tips">
          您的简历还有{{
            baseInfoCount + intentionCount + educationCount + workExpCount + bonusItemCount
          }}个优化项，继续完善提高就职成功率！
        </view>

        <scroll-view class="scroll-view_H" scroll-x="true" @scroll="scroll_H">
          <view class="scroll-view-item_H">
            <view class="tabs-text"
              >基本信息
              <span v-if="baseInfoCount" class="badge">{{ baseInfoCount }}</span>
            </view>
          </view>
          <view class="scroll-view-item_H">
            <view class="tabs-text"
              >工作意向
              <span v-if="intentionCount" class="badge">{{ intentionCount }}</span>
            </view>
          </view>
          <view class="scroll-view-item_H">
            <view class="tabs-text"
              >教育经历
              <span v-if="educationCount" class="badge">{{ educationCount }}</span>
            </view>
          </view>
          <view class="scroll-view-item_H">
            <view class="tabs-text"
              >工作经历
              <span v-if="workExpCount" class="badge">{{ workExpCount }}</span>
            </view>
          </view>
          <view class="scroll-view-item_H">
            <view class="tabs-text"
              >加分项
              <span v-if="bonusItemCount" class="badge">{{ bonusItemCount }}</span>
            </view>
          </view>
        </scroll-view>

        <view class="tips-score">
          <view class="tips-score-item"
            >综合得分：{{ curriculumVitae.resumeCompleteness + 60 }}分</view
          >
          <view class="tips-score-line">|</view>
          <view class="tips-score-item"
            >相对竞争力：
            <template v-if="curriculumVitae.resumeCompleteness + 60 <= 75">一般</template>
            <template v-else-if="curriculumVitae.resumeCompleteness + 60 >= 91">超棒</template>
            <template v-else>较好</template>
          </view>
        </view>

        <!-- 原本tab -->
        <view class="perfect-tabs" :style="{opacity: Number(!isFixed)}">
          <view :class="tabActive == 'a' ? 'tabs-item on' : 'tabs-item'" @click="scrollTo('a')"
            >基本信息</view
          >
          <view :class="tabActive == 'b' ? 'tabs-item on' : 'tabs-item'" @click="scrollTo('b')"
            >工作意向</view
          >
          <view :class="tabActive == 'c' ? 'tabs-item on' : 'tabs-item'" @click="scrollTo('c')"
            >教育经历</view
          >
          <view :class="tabActive == 'd' ? 'tabs-item on' : 'tabs-item'" @click="scrollTo('d')"
            >工作经历</view
          >
          <view :class="tabActive == 'e' ? 'tabs-item on' : 'tabs-item'" @click="scrollTo('e')"
            >加分项</view
          >
        </view>

        <view ref="refItemA" id="a" class="section" style="position: relative">
          <view class="section-title"> <span class="title-line"></span>基本信息 </view>

          <view class="form-item">
            <span class="label"
              >姓<span style="display: inline-block; width: 55rpx"></span>名：</span
            >
            <input
              type="text"
              v-model="curriculumVitae.realName"
              placeholder="请填写真实姓名"
              maxlength="6"
              placeholder-style="color: #ccc; font-size: 24rpx;"
            />
            <img
              class="arrow-right1"
              src="https://pic.bangbangtongcheng.com/static/PublicButton/edit.png"
              alt=""
            />
          </view>
          <view class="form-item">
            <span class="label"
              >性<span style="display: inline-block; width: 55rpx"></span>别：</span
            >
            <span
              :class="curriculumVitae.sexualDistinction == 1 ? 'checked form-btn' : 'form-btn'"
              @click.stop="setSex(1)"
              >男</span
            >
            <span
              :class="curriculumVitae.sexualDistinction == 2 ? 'checked form-btn' : 'form-btn'"
              @click.stop="setSex(2)"
              >女</span
            >
          </view>

          <!-- 年龄 -->
          <MyAge :value.sync="curriculumVitae.age" :show.sync="showCommon.myAge" @changeShow="(data) => commonChange(data,'myAge')" />
          <view class="my-photo">
            <view class="uploadPhotos">
              <imageUploadCropper
                ref="imageUploadCropperRef"
                class="Photos"
                v-model="imgList"
                :addImgUrl="addImgUrl"
                :lengthNum="1"
                selWidth="400rpx"
                selHeight="400rpx"
                disabled
                :ratio="1"
                @returnSuccess="returnSuccess"
                @deleteImg="deleteImg"
              >
              </imageUploadCropper>
            </view>
            <view class="photo-btn" @click="chooseImage">
              点击上传头像
            </view>
          </view>

          <!-- 工作年龄 -->
          <WorkExperience :value.sync="curriculumVitae.workingTime" :show.sync="showCommon.workingTime" @changeShow="(data) => commonChange(data,'workingTime')" />

          <view class="form-item">
            <view style="display: flex; align-items: flex-start; width: 580rpx;">
              <span class="label">现居地址：</span>
              <u--textarea
                v-model="curriculumVitae.homeAddress"
                style="width: 444rpx"
                border="0"
                placeholder="请输入内容"
                autoHeight
                :maxlength="50"
                @input="changeHomeAddress"
                confirmType="done"
                placeholderStyle="color: #ccc; font-size: 24rpx;line-height:36rpx"
              ></u--textarea>
            </view>
            <view style="margin-left: auto">
              <img
                class="arrow-right2"
                src="https://pic.bangbangtongcheng.com/static/PublicButton/edit.png"
                alt=""
              />
              <image
                style="width: 28rpx;height: 28rpx;"
                mode="widthFix"
                src="https://pic.bangbangtongcheng.com/static/bbzc/map.png"
                alt=""
                @click="getLocation"
              />
            </view>
          </view>

          <view class="form-item" style="flex-flow: column wrap; align-items: flex-start; width: 670rpx;padding-bottom: 60rpx;">
            <view class="label">自我介绍： </view>
            <view style="width: 100%;">
              <u--textarea
                v-model="curriculumVitae.introduction"
                count
                :maxlength="60"
                confirmType="done"
                ref="textarea"
                class="pr80"
                style="width: 100%;height: 160rpx;"
                border="0"
                placeholder="请简要介绍你的个人评价，让招聘者快速了解你。为了保护个人隐私，请勿在简介中填写电话、微信、邮箱等联系方式，否则其内容可能被删除或屏蔽。"
                placeholderStyle="color: #ccc; font-size: 24rpx;"
              ></u--textarea>
            </view>

            <img
              class="arrow-right3"
              src="https://pic.bangbangtongcheng.com/static/PublicButton/edit.png"
              alt=""
            />
          </view>
        </view>

        <view ref="refItemB" id="b" class="section" style="position: relative">
          <view class="section-title"> <span class="title-line"></span>工作意向 </view>

          <view class="form-item">
            <span class="label">意向职位：</span>
            <view style="width: 75%" @click="toExpeirence(3, null, 'b')">
              {{ intendedPositionText }}
            </view>
            <img
              class="arrow-right"
              src="https://pic.bangbangtongcheng.com/static/bbzc/arrow-right.png"
              alt=""
              @click="toExpeirence(3, null, 'b')"
            />
          </view>

          <view class="form-item">
            <span class="label">求职状态：</span>
            <span
              :class="curriculumVitae.jobStatus == 1 ? 'checked form-btn' : 'form-btn'"
              style="margin-left: 0; width: 210rpx"
              @click.stop="setJobStatus(1)"
              >离职，随时到岗</span
            >
            <span
              :class="curriculumVitae.jobStatus == 2 ? 'checked form-btn' : 'form-btn'"
              style="width: 210rpx"
              @click.stop="setJobStatus(2)"
              >在职，考虑机会</span
            >
          </view>

          <!-- 期望薪资 -->
          <SalaryExpectation labelName="期望薪资" :value.sync="curriculumVitae.salaryExpectation" :show.sync="showCommon.salaryExpectation" :select-list="salaryExp" @changeShow="(data) => commonChange(data,'salaryExpectation')"/>

          <view class="form-item">
            <span class="label">工作区域：</span>
            <view style="width: 78%" @click="openDistrict">
              {{ workLocationText }}
              <!-- <uni-icons class="icon " :class="{open: selectorDistrict,}" type="right" /> -->
              <img
                :class="selectorDistrict ? 'arrow-right open' : 'arrow-right'"
                src="https://pic.bangbangtongcheng.com/static/bbzc/arrow-right.png"
                alt=""
              />
            </view>

            <view v-if="selectorDistrict" class="seclector-box">
              <span
                v-for="(item, index) in district"
                :key="item.label"
                :class="item.checked ? 'work-btn checked' : 'work-btn'"
                @click.stop="() => chooseDistrict(item, index)"
              >
                {{ item.label }}
              </span>
            </view>
          </view>

          <view class="form-item">
            <span class="label">求职类型：</span>
            <span
              :class="curriculumVitae.jobType == '2' ? 'form-btn checked' : 'form-btn'"
              style="width: 180rpx"
              @click="setType('2')"
              >全职兼职均可</span
            >
            <span
              :class="curriculumVitae.jobType == '0' ? 'form-btn checked ' : 'form-btn'"
              style="width: 120rpx"
              @click="setType('0')"
              >全职</span
            >
            <span
              :class="curriculumVitae.jobType == '1' ? 'form-btn checked' : 'form-btn'"
              style="width: 120rpx"
              @click="setType('1')"
              >兼职</span
            >
          </view>
        </view>

        <view ref="refItemC" id="c" class="section" style="position: relative" :key="educationKey">
          <view class="section-title"> <span class="title-line"></span>教育经历 </view>

          <view class="form-item">
            <span class="label">毕业院校：</span>
            <u-textarea
              v-model="curriculumVitae.graduationAcademy.schoolName"
              auto-height=""
              maxlength="19"
              confirmType="done"
              ref="schoolName"
              border="none"
              placeholder="请填写您的毕业院校"
              placeholderStyle="color: #ccc; font-size: 24rpx;"
            ></u-textarea>
            <img
              class="arrow-right"
              src="https://pic.bangbangtongcheng.com/static/PublicButton/edit.png"
              alt=""
            />
          </view>

          <!-- 最高学历 -->
          <HighestEducation :value.sync="curriculumVitae.highestEducation" :show.sync="showCommon.highestEducation" :select-list="type3" @changeShow="(data) => commonChange(data,'highestEducation')"/>

          <view class="form-item">
            <span class="label">所学专业：</span>
            <u-textarea
              v-model="curriculumVitae.graduationAcademy.major"
              auto-height=""
              maxlength="19"
              confirmType="done"
              ref="major"
              border="none"
              placeholder="请输入专业名称"
              placeholderStyle="color: #ccc; font-size: 24rpx;"
            ></u-textarea>
            <img
              class="arrow-right"
              src="https://pic.bangbangtongcheng.com/static/PublicButton/edit.png"
              alt=""
            />
          </view>

          <!-- 毕业时间 -->
          <GraduationTime labelName="毕业时间" :value.sync="curriculumVitae.graduationAcademy.schoolHours" :show.sync="showCommon.graduationTime" @changeShow="(data) => commonChange(data,'graduationTime')"/>

          <view class="form-item">
            <span class="label">获得荣誉：</span>
            <span
              v-for="(item, index) in honorReceivedOption"
              :key="index"
              :class="item.checked ? 'checked tag-item' : 'tag-item'"
              @click="chooseHonor(item, index)"
            >
              {{ item.valueName }}
            </span>
            <span class="tag-item" @click="custom">+自定义</span>
          </view>

          <view class="form-item">
            <view class="center-section" style="padding-bottom: 0">
              <view class="content-title">
                <view style="font-size: 28rpx; color: #333">
                  学习经历：<span style="color: #0fa291">{{ associationActivityNum }}</span> /2000
                </view>
                <view class="content-title-right" @click="popTemShow">
                  <img
                    style="margin-right: 10rpx; width: 24rpx; height: 24rpx"
                    src="https://pic.bangbangtongcheng.com/static/bbzc/check-demo.png"
                    alt=""
                  />查看示例
                </view>
              </view>
              <view class="content-tip">
                请勿在描述中填写电话、微信、邮箱等联系方式，否则其内容可能被删除或者屏蔽。
              </view>
              <view class="kuang">
                <textarea
                  ref="associationActivity"
                  maxlength="2000"
                  style="width: 100%; height: 240rpx"
                  v-model="curriculumVitae.graduationAcademy.associationActivity"
                  :placeholder="describe"
                  placeholderStyle="font-size:24rpx;color:#ccc"
                  @input="learningInput"
                />
              </view>
            </view>
          </view>
        </view>

        <!-- 工作经历 -->
        <view ref="refItemD" id="d" :key="workExpKey">
          <view
            class="section"
            style="position: relative"
            v-for="(item, index) in curriculumVitae.workExperience"
            :key="index"
            @click="updateWorkExpIndex(index)"
          >
            <view class="section-title">
              <span class="title-line"></span>工作经历
              <span v-if="item.corporateName && index == 0" class="work-add" @click="addWorkEpx"
                >+添加</span
              >
              <u-icon
                v-if="index !== 0"
                name="trash"
                color="#0FA291"
                size="20"
                style="margin-left: auto; margin-right: 20rpx"
                @click="deleteWorkEpx(index)"
              ></u-icon>
            </view>

            <view class="work-box">
              <view v-if="item.corporateName" class="form-item">
                <span style="margin-right: 20rpx; color: #666">对这家公司隐藏我的信息</span>
                <u-switch
                  v-model="item.onlyHide"
                  activeColor="#0FA291"
                  size="20"
                  asyncChange
                  @change="switchChange"
                ></u-switch>
              </view>

              <view class="form-item" style="padding-right: 30rpx">
                <span class="label">公司名称：</span>
                <u-textarea
                  v-model="item.corporateName"
                  width="460rpx"
                  autoHeight
                  maxlength="30"
                  confirmType="done"
                  border="none"
                  placeholder="请填写公司名称"
                  placeholderStyle="color: #ccc; font-size: 24rpx;"
                ></u-textarea>
                <img
                  class="arrow-right"
                  src="https://pic.bangbangtongcheng.com/static/PublicButton/edit.png"
                  alt=""
                />
              </view>

              <!-- 在职时间 -->
              <WorkingHours labelName="在职时间" :value.sync="item.onJobTime" :show.sync="item.workingHoursPicker" @changeShow="(data) => commonChange(data,index,`workExperience`)"/>

              <!-- 薪资范围 -->
              <WorkSalaryRange labelName="薪资范围" :value.sync="item.salaryRange" :show.sync="item.workSalaryRangePicker" :select-list="salaryExp" @changeShow="(data) => commonChange(data,index,'workExperience')"/>

              <view class="form-item">
                <span class="label">职位类别：</span>
                <view @click="toExpeirence(1, index, 'd')" style="width: 78%">
                  <view v-if="item.positionNameText"> {{ item.positionNameText }} </view>
                  <view v-else class="placeholder"> 请选择职位类别 </view>
                  <img
                    class="arrow-right"
                    src="https://pic.bangbangtongcheng.com/static/bbzc/arrow-right.png"
                    alt=""
                  />
                </view>
              </view>

              <view class="form-item">
                <span class="label">个人优势：</span>
                <span
                  v-for="(v, i) in item.personalAdvantage"
                  :key="i"
                  :class="v.checked ? 'checked tag-item' : 'tag-item'"
                  @click.stop="() => chooseAdvantage(index, v, i)"
                >
                  {{ v.valueName }}
                </span>
                <span class="tag-item" @click="customAdvanceOpen(index)">+自定义</span>
              </view>

              <view class="form-item">
                <view class="center-section" style="padding-bottom: 0">
                  <view class="content-title">
                    <view style="font-size: 28rpx; color: #333">
                      工作描述：<span style="color: #0fa291">{{ item.jobContentNum || 0 }}</span>
                      /2000
                    </view>
                    <view class="content-title-right" @click="popWorkTemShow">
                      <img
                        style="margin-right: 10rpx; width: 24rpx; height: 24rpx"
                        src="https://pic.bangbangtongcheng.com/static/bbzc/check-demo.png"
                        alt=""
                      />查看示例
                    </view>
                  </view>
                  <view class="content-tip">
                    请勿在描述中填写电话、微信、邮箱等联系方式，否则其内容可能被删除或者屏蔽。
                  </view>
                  <view class="kuang">
                    <textarea
                      maxlength="2000"
                      style="width: 100%; height: 238rpx"
                      v-model="item.jobContent"
                      :placeholder="workDescribe"
                      placeholderStyle="font-size:24rpx;color:#ccc"
                      @input="jobInput(index)"
                    />
                  </view>
                </view>
              </view>
            </view>
          </view>
        </view>

        <!-- 加分项 -->
        <view ref="refItemE" id="e" class="section" style="position: relative" :key="bonusKey">
          <view
            class="section-title"
            style="margin: 0 20rpx; padding-left: 0; border-bottom: 1rpx solid #e0e0e0"
          >
            <span class="title-line"></span>加分项
          </view>
          <view class="content-wrap">
            <view class="bonus-key-box">
              <view
                v-for="(item, index) in curriculumVitae.bonusItem.trainingExperience"
                :key="index"
                class="content"
              >
                <view class="bonusItem-title">
                  培训经历：
                  <span
                    v-if="item.trainingInstitutions && index == 0"
                    class="bonusItem-add"
                    @click="addTrianing"
                    >+添加</span
                  >
                  <u-icon
                    v-if="index !== 0"
                    name="trash"
                    color="#0FA291"
                    size="20"
                    style="margin-left: auto; margin-right: 20rpx"
                    @click="deleteTrianing(index)"
                  ></u-icon>
                </view>

                <view class="bonusItem-box">
                  <view class="bonus-item" @click="updateTrianingIndex(index)">
                    <view class="form-item">
                      <span class="label">培训机构：</span>
                      <input
                        type="text"
                        @input="changeIput"
                        v-model="item.trainingInstitutions"
                        style="width: 460rpx"
                        placeholder="请输入培训机构名称"
                        placeholder-style="color: #ccc; font-size: 24rpx;"
                      />
                      <img
                        class="arrow-right"
                        src="https://pic.bangbangtongcheng.com/static/PublicButton/edit.png"
                        alt=""
                      />
                    </view>

                    <view class="form-item">
                      <span class="label">培训课程：</span>
                      <input
                        type="text"
                        v-model="item.trainingCourse"
                        @input="changeIput"
                        style="width: 460rpx"
                        placeholder="请输入培训课程"
                        placeholder-style="color: #ccc; font-size: 24rpx;"
                      />
                      <img
                        class="arrow-right"
                        src="https://pic.bangbangtongcheng.com/static/PublicButton/edit.png"
                        alt=""
                      />
                    </view>

                    <!-- 培训时间 -->
                    <PlusesHours labelName="培训时间" :value.sync="item.trainingTime" :show.sync="item.plusesHoursPicker" @changeShow="(data) => commonChange(data,index,`trainingExperience`,!0)"/>
                  </view>
                </view>
              </view>
            </view>
            <view class="bonus-key-box">
              <view
                class="content"
                v-for="(item, index) in curriculumVitae.bonusItem.languageAbility"
                :key="index"
              >
                <view class="bonusItem-title">
                  语言能力：
                  <span
                    v-if="item.languages && index == 0"
                    class="bonusItem-add"
                    @click="addLanguages"
                    >+添加</span
                  >
                  <u-icon
                    v-if="index !== 0"
                    name="trash"
                    color="#0FA291"
                    size="20"
                    style="margin-left: auto; margin-right: 20rpx"
                    @click="deleteLanguages(index)"
                  ></u-icon>
                </view>

                <view class="bonusItem-box">
                  <view class="bonus-item" @click="updateLanguagesIndex(index)">

                    <!-- 技能名称 -->
                    <PlusesLanguages :value.sync="item.languages" :show.sync="item.plusesLanguagesPicker" :select-list="languagesOption" @changeShow="(data) => commonChange(data,index,`languageAbility`,!0)"/>

                    <view class="form-item">
                      <span class="label">听说能力：</span>
                      <span
                        :class="
                          item.listeningSpeakingAbility == '1' ? 'checked form-btn' : 'form-btn'
                        "
                        style="width: 100rpx"
                        key="1"
                        @click="setListen(index, '1')"
                        >一般</span
                      >
                      <span
                        :class="
                          item.listeningSpeakingAbility == '2' ? 'checked form-btn' : 'form-btn'
                        "
                        style="width: 100rpx"
                        key="2"
                        @click="setListen(index, '2')"
                        >良好</span
                      >
                      <span
                        :class="
                          item.listeningSpeakingAbility == '3' ? 'checked form-btn' : 'form-btn'
                        "
                        style="width: 100rpx"
                        key="3"
                        @click="setListen(index, '3')"
                        >熟练</span
                      >
                      <span
                        :class="
                          item.listeningSpeakingAbility == '4' ? 'checked form-btn' : 'form-btn'
                        "
                        style="width: 100rpx"
                        key="4"
                        @click="setListen(index, '4')"
                        >精通</span
                      >
                    </view>
                    <view class="form-item">
                      <span class="label">读写能力：</span>
                      <span
                        :class="item.readingWritingAbility == '1' ? 'checked form-btn' : 'form-btn'"
                        style="width: 100rpx"
                        key="1"
                        @click="setRead(index, '1')"
                        >一般</span
                      >
                      <span
                        :class="item.readingWritingAbility == '2' ? 'checked form-btn' : 'form-btn'"
                        style="width: 100rpx"
                        key="2"
                        @click="setRead(index, '2')"
                        >良好</span
                      >
                      <span
                        :class="item.readingWritingAbility == '3' ? 'checked form-btn' : 'form-btn'"
                        style="width: 100rpx"
                        key="3"
                        @click="setRead(index, '3')"
                        >熟练</span
                      >
                      <span
                        :class="item.readingWritingAbility == '4' ? 'checked form-btn' : 'form-btn'"
                        style="width: 100rpx"
                        key="4"
                        @click="setRead(index, '4')"
                        >精通</span
                      >
                    </view>
                  </view>
                </view>
              </view>
            </view>
            <view class="bonus-key-box">
              <view
                class="content"
                v-for="(item, index) in curriculumVitae.bonusItem.qualification"
                :key="item.key">
                <view class="bonusItem-title">
                  资质证书：
                  <span
                    v-if="item.certificateName && index == 0"
                    class="bonusItem-add"
                    @click="addQualification"
                    >+添加</span
                  >
                  <u-icon
                    v-if="index !== 0"
                    name="trash"
                    color="#0FA291"
                    size="20"
                    style="margin-left: auto; margin-right: 20rpx"
                    @click="deleteQualification(index)"
                  ></u-icon>
                </view>

                <view class="bonusItem-box">
                  <view class="bonus-item" @click="updateQualificationIndex(index)">
                    <view class="form-item">
                      <span class="label">证书名称：</span>
                      <input
                        :key="item.key"
                        :data-key="item.key"
                        type="text"
                        v-model="item.certificateName"
                        style="width: 460rpx"
                        placeholder="请输入证书名称"
                        placeholder-style="color: #ccc; font-size: 24rpx;"
                        @input="(e) => changeIput(e,'qualification','certificateName',index)"
                      />
                      <img
                        class="arrow-right"
                        src="https://pic.bangbangtongcheng.com/static/PublicButton/edit.png"
                        alt=""
                      />
                    </view>

                    <!-- 获得时间 -->
                    <GraduationTime labelName="获得时间" :value.sync="item.getTime" :show.sync="item.getTimePicker" @changeShow="(data) => commonChange(data,index,`qualification`,!0)"/>
                  </view>
                </view>
              </view>
            </view>

            <view class="bonus-key-box">
              <view
                class="content"
                v-for="(item, index) in curriculumVitae.bonusItem.professionalSkills"
                :key="index">
                <view class="bonusItem-title">
                  专业技能：
                  <span v-if="item.skillName && index == 0" class="bonusItem-add" @click="addSkills"
                    >+添加</span
                  >
                  <u-icon
                    v-if="index !== 0"
                    name="trash"
                    color="#0FA291"
                    size="20"
                    style="margin-left: auto; margin-right: 20rpx"
                    @click="deleteSkills(index)"
                  ></u-icon>
                </view>

                <view class="bonusItem-box">
                  <view class="bonus-item" @click="updateSkillsIndex(index)">
                    <view class="form-item">
                      <span class="label">技能名称：</span>
                      <input
                        type="text"
                        v-model="item.skillName"
                        style="width: 460rpx"
                        placeholder="请输入技能名称"
                        placeholder-style="color: #ccc; font-size: 24rpx;"
                        @input="(e) => changeIput(e,'professionalSkills','skillName',index)"
                      />
                      <img
                        class="arrow-right"
                        src="https://pic.bangbangtongcheng.com/static/PublicButton/edit.png"
                        alt=""
                      />
                    </view>
                    <view class="form-item">
                      <span class="label">使用时长：</span>
                      <input
                        type="number"
                        v-model="item.duration"
                        style="width: 400rpx;"
                        placeholder="请输入"
                        placeholder-style="color: #ccc; font-size: 24rpx;"
                        @input="(e) => changeIput(e,'professionalSkills','duration',index)"
                      />
                      年
                      <img
                        class="arrow-right"
                        src="https://pic.bangbangtongcheng.com/static/PublicButton/edit.png"
                        alt=""
                      />
                    </view>
                    <view class="form-item">
                      <span class="label">掌握程度：</span>
                      <span
                        :class="item.mastery == '1' ? 'checked form-btn' : 'form-btn'"
                        style="width: 100rpx"
                        @click="setMastery(index, '1')"
                        >一般</span
                      >
                      <span
                        :class="item.mastery == '2' ? 'checked form-btn' : 'form-btn'"
                        style="width: 100rpx"
                        @click="setMastery(index, '2')"
                        >良好</span
                      >
                      <span
                        :class="item.mastery == '3' ? 'checked form-btn' : 'form-btn'"
                        style="width: 100rpx"
                        @click="setMastery(index, '3')"
                        >熟练</span
                      >
                      <span
                        :class="item.mastery == '4' ? 'checked form-btn' : 'form-btn'"
                        style="width: 100rpx"
                        @click="setMastery(index, '4')"
                        >精通</span
                      >
                    </view>
                    <view class="form-item">
                      <view class="label" style="margin-bottom: 20rpx; width: 100%">证书/作品：</view>
                      <!-- {{ item.certificateWorks }} -->
                      <u-upload
                        :fileList="item.certificateWorks"
                        :maxCount="9"
                        :multiple="true"
                        uploadText="上传图片"
                        @afterRead="afterRead"
                        @delete="deletePic"
                      ></u-upload>
                    </view>
                  </view>
                </view>
              </view>
            </view>

          </view>
        </view>

        <view class="section">
          <view
            class="form-item"
            style="flex-direction: column; align-items: flex-start; padding-top: 0; border-top: 0"
          >
            <view
              class="section-title"
              style="padding-left: 0; width: 100%; border-bottom: 0.5rpx solid #e0e0e0"
            >
              <span class="title-line"></span>当前简历对谁可见：
            </view>
            <view style="display: flex; align-items: center; margin-top: 15rpx; width: 100%">
              <span
                :class="curriculumVitae.visibleRange == '1' ? 'checked form-btn' : 'form-btn'"
                style="margin: 0; width: 170rpx"
                @click.stop="setVisibleRange('1')"
                >全部可见</span
              >
              <span
                :class="curriculumVitae.visibleRange == '2' ? 'checked form-btn' : 'form-btn'"
                style="margin: 0; margin-left: 20rpx; width: 230rpx"
                @click.stop="setVisibleRange('2')"
                >认证企业可见</span
              >
              <!-- <span :class="curriculumVitae.visibleRange == '3' ? 'checked form-btn' : 'form-btn'"
								style="margin:0;width: 250rpx;" @click.stop="setVisibleRange('招聘相应职位可见')">招聘相应职位可见</span> -->
            </view>
          </view>
        </view>

        <view class="submit-box">
          <view class="submit-txt">
            <span v-if="checked" class="checkbox agree" @click="changeAgree">
              <u-icon name="checkbox-mark" color="#fff" size="14"></u-icon>
            </span>
            <span v-else class="checkbox reject" @click="changeAgree"></span>
            <span @click="changeAgree">
              发布即默认同意 <span @click="toUs(2)">《帮帮同城隐私政策》</span> 和
              <span @click="toUs(3)">《帮帮同城用户协议》</span>
            </span>
          </view>
          <view class="submit-btn" @click="stepSubmit">确认发布</view>
        </view>
      </scroll-view>

      <!-- 固定定位tab 放在scroll中 scroll使用padding，ios会有溢出隐藏情况 -->
      <view v-show="isFixed">
        <view class="perfect-tabs tabs-fixed">
          <view :class="tabActive == 'a' ? 'tabs-item on' : 'tabs-item'" @click="scrollTo('a')"
            >基本信息</view
          >
          <view :class="tabActive == 'b' ? 'tabs-item on' : 'tabs-item'" @click="scrollTo('b')"
            >工作意向</view
          >
          <view :class="tabActive == 'c' ? 'tabs-item on' : 'tabs-item'" @click="scrollTo('c')"
            >教育经历</view
          >
          <view :class="tabActive == 'd' ? 'tabs-item on' : 'tabs-item'" @click="scrollTo('d')"
            >工作经历</view
          >
          <view :class="tabActive == 'e' ? 'tabs-item on' : 'tabs-item'" @click="scrollTo('e')"
            >加分项</view
          >
        </view>
      </view>
      <!-- 查看学习经历示例 -->
      <uni-popup ref="popTem" type="bottom" border-radius="10px 10px 0 0">
        <view class="pop">
          <view class="pop-title">
            <span class="title">示例</span>
            <img
              class="close"
              src="https://pic.bangbangtongcheng.com/static/bbzc/close.png"
              alt=""
              @click="popTemHide"
            />
          </view>
          <!-- <view ref="temText" class="pop-content"> -->
          <view v-if="show.popTem" ref="temText" class="pop-content">
            <scroll-view scroll-y style="height: 240rpx;">
              <textarea
                maxlength="2000"
                style="width: 100%"
                auto-height
                v-model="associationActivityTem"
                disabled
                placeholder="模板内容"
                placeholderStyle="font-size:24rpx;color:#ccc"
              />
            </scroll-view>
          </view>
          <view class="pop-btn">
            <view class="btn-on" @click="useTem">
              <img src="https://pic.bangbangtongcheng.com/static/bbzc/use.png" alt="" />
              使用此模板</view
            >
            <view class="btn-off" @click="changeTem">
              <img src="https://pic.bangbangtongcheng.com/static/bbzc/refresh.png" alt="" />换一个
            </view>
          </view>
        </view>
      </uni-popup>

      <!-- 查看工作经历示例 -->
      <uni-popup ref="popWorkTem" type="bottom" border-radius="10px 10px 0 0">
        <view class="pop">
          <view class="pop-title">
            <span class="title">示例</span>
            <img
              class="close"
              src="https://pic.bangbangtongcheng.com/static/bbzc/close.png"
              alt=""
              @click="popWorkTemHide"
            />
          </view>
          <!-- <view ref="temText" class="pop-content"> -->
          <view v-if="show.popWorkTem" ref="temText" class="pop-content">
            <scroll-view scroll-y style="height: 500rpx;">
              <textarea
                maxlength="2000"
                style="width: 100%"
                auto-height
                v-model="workText"
                disabled
                placeholder="模板内容"
                placeholderStyle="font-size:24rpx;color:#ccc"
              />
            </scroll-view>
          </view>
          <view class="pop-btn">
            <view class="btn-on" @click="useWorkTem">
              <img src="https://pic.bangbangtongcheng.com/static/bbzc/use.png" alt="" />
              使用此模板</view
            >
            <view class="btn-off" @click="changeWorkTem">
              <img src="https://pic.bangbangtongcheng.com/static/bbzc/refresh.png" alt="" />换一个
            </view>
          </view>
        </view>
      </uni-popup>

      <!-- 自定义获得荣誉-->
      <uni-popup ref="bindAddFL" type="center" :animation="false">
        <view class="bindAddFL_frame">
          <view class="title">
            <view class="title_right"></view>
            <view class="title_center"> 获得荣誉 </view>
            <view class="title_right" @click="bindAddFL_close">
              <image
                class="image"
                src="https://pic.bangbangtongcheng.com/static/bbzc/FuLiClose.png"
              ></image>
            </view>
          </view>
          <view class="center">
            <input
              class="inputs"
              v-model="customHonor"
              placeholder="请输入"
              type="text"
              @input="addFuliInput"
              placeholder-style="font-size:24rpx;color:#ccc"
            />
            <span class="inputs_zis">{{ honorCount }}/5</span>
          </view>
          <view class="bottoms" @click="confirmAdd"> 完成 </view>
        </view>
      </uni-popup>

      <!-- 自定义个人优势 -->
      <uni-popup ref="bindAddAdvance" type="center" :animation="false">
        <view class="bindAddFL_frame">
          <view class="title">
            <view class="title_right"></view>
            <view class="title_center"> 个人优势 </view>
            <view class="title_right" @click="bindAddAdvance_close">
              <image
                class="image"
                src="https://pic.bangbangtongcheng.com/static/bbzc/FuLiClose.png"
              ></image>
            </view>
          </view>
          <view class="center">
            <input
              class="inputs"
              v-model="customAdvance"
              placeholder="请输入自定义个人优势"
              type="text"
              @input="addAdvanceInput"
              placeholder-style="font-size:24rpx;color:#ccc"
            />
            <span class="inputs_zis">{{ advanceCount }}/5</span>
          </view>
          <view class="bottoms" @click="confirmAddAdvance"> 完成 </view>
        </view>
      </uni-popup>

      <!-- 发布成功 -->
      <uni-popup ref="binds" type="center" :mask-click="false">
        <view class="bindPublicSuccess_frame">
          <view class="binds_frame_t">
            <image src="https://pic.bangbangtongcheng.com/static/PublicButton/refresh.png"></image
            >简历发布成功，审核中...
          </view>
          <view class="binds_frame_c">信息审核通过后，可在“我的-完善简历”中继续完善</view>
        </view>
      </uni-popup>
    </view>
  </view>
</template>
<script>
  //#ifdef H5
  import wxshare from '@/utils/index.js'
  //#endif
  import { mapGetters } from 'vuex'
  import { getYear } from '../../util/dateTimePicker.js'
  import imageUploadCropper from '@/components/imageUploadCropper.vue'
  import { district } from '@/util/enum.js'
  import _ from 'lodash'
  import { getTimes } from '../../util/dateTimePicker.js';
  import MyAge from '../sub-components/perfectResume/my-age.vue';
  import WorkExperience from '../sub-components/perfectResume/work-experience.vue';
  import SalaryExpectation from '../sub-components/perfectResume/salary-expectation.vue';
  import HighestEducation from '../sub-components/perfectResume/highest-education.vue';
  import GraduationTime from '../sub-components/perfectResume/graduation-time.vue';
  import WorkingHours from '../sub-components/perfectResume/working-hours.vue';
  import WorkSalaryRange from '../sub-components/perfectResume/work-salary-range.vue';
  import PlusesHours from '../sub-components/perfectResume/pluses-hours.vue';
  import PlusesLanguages from '../sub-components/perfectResume/pluses-languages.vue';


  export default {
    components: {
      imageUploadCropper,
      MyAge,
      WorkExperience,
      SalaryExpectation,
      HighestEducation,
      GraduationTime,
      WorkingHours,
      WorkSalaryRange,
      PlusesHours,
      PlusesLanguages,
    },
    data() {
      const todayDate = new Date();
      return {
        loding: true,
        mainTop: 0,
        dro: 0,
        toTops: [
          {
            id: 'a',
            btm: 0,
          },
          {
            id: 'b',
            btm: 0,
          },
          {
            id: 'c',
            btm: 0,
          },
          {
            id: 'd',
            btm: 0,
          },
          {
            id: 'e',
            btm: 0,
          },
        ],
        scrollTimeout: null,
        userInfo: uni.getStorageSync('Pduser'),
        scrollTop: 0,
        back: 0, // 1 - 职位类别返回完善简历
        old: {
          scrollTop: 0,
          naviST: 0,// 用于跳转后回到同样目录
        },
        show: {
          popTem: false,
          popWorkTem: false,
        },
        todayDate,
        showCommon: {
          workingTime: false,
          salaryExpectation: false,
          highestEducation: false,
          graduationTime: false,
          // workingHours0: false, // 这几个通过数组内控制，不然小程序会报错
          // workSalaryRange0: false, // 这几个通过数组内控制，不然小程序会报错
          // plusesHours0: false, // 这几个通过数组内控制，不然小程序会报错
          // plusesLanguages0: false, // 这几个通过数组内控制，不然小程序会报错
          // plusesGetTime0: false, // 这几个通过数组内控制，不然小程序会报错
        },
        curriculumVitae: {
          id: '',
          publisherId: '', //发布人ID
          resumeCompleteness: 0, //综合得分
          myPhoto: '', //本人照片
          realName: '', //真实姓名
          age: 0,
          sexualDistinction: '', //性别（1：男，2：女）
          jobStatus: '', //在职状态 *****
          dateBirth: 1995, //出生年
          cellphoneNumber: '', //手机号
          workingTime: 2018, //参加工作时间
          experienceYears: 0,
          graduationAcademy: {
            id: null,
            schoolName: '', // 毕业院校
            major: '', // 所学专业
            schoolHours: '', //毕业时间
            associationActivity: '', // 学习经历
            honorReceived: [], // 获得荣誉
          }, //毕业院校
          //工作经历
          workExperience: [],
          highestEducation: '本科', //最高学历
          homeAddress: '', //家庭地址
          longitude: '', //经度
          latitude: '', //纬度
          workLocation: [], // 工作地区 ******
          intendedPosition: '', //意向职位
          salaryExpectation: '', //目标收入
          jobType: '', // 求职类型 *****
          introduction: '', // 自我介绍 *****
          //加分项
          bonusItem: {
            trainingExperience: [],
            languageAbility: [],
            qualification: [],
            professionalSkills: [
              {
                skillName: '',
                duration: '',
                mastery: '',
                certificateWorks: [],
              },
            ],
          },
          visibleRange: '全部可见', //对谁可见（全部可见、认证企业可见、招聘相应职位可见
          dateIndex: [0, 0], // 毕业院校index
        },
        associationActivityNum: 0, // 学习经历字数
        age: '',
        salaryExpectationIndex: 4, //目标收入默认值：4：'5001-8000元'
        imgList: [], // 头像
        addImgUrl: 'https://pic.bangbangtongcheng.com/static/bbzc/upload.png',
        intendedPositionText: '',
        salaryExp: [], // 目标收入枚举
        district: JSON.parse(JSON.stringify(district)), // 地区枚举，务必重新指向一次新地址，以免缓存中会反复影响
        workLocationText: '', // 工作地区文本
        selectorDistrict: false, // 工作地区选择器容器
        type3: [], // 学历数据
        honorReceivedOption: [], // 荣誉列表
        describe: `请输入学习经历:\n1.描述您在学校的学习情况 \n2.描述您在校担任过的职务和获得的荣誉`,
        workDescribe: '请输入职位描述:\n1.工作内容 \n2.任职要求',
        studyList: [], // 学习经历示例列表
        associationActivityTem: '', // 当前学习经历模板
        workHours: [], // 在职起始时间年份options
        workHours_month: [], // 在职起始时间月份options
        workHours2: [], // 在职结束时间年份options
        workHours2_month: [], // 在职结束时间月份options
        dateIndex1: [0, 0],
        dateIndex2: [0, 0],
        educationKey: 1000,
        workExpIndex: 0, // 工作经历数组索引
        workExpKey: 2000,
        workList: [], // 工作经历示例模板
        workText: '', //工作经历
        trianingIndex: 0, // 培训经历序号
        languagesOption: ['英语', '法语', '日语', '韩语', '西班牙语'],
        languageIndex: 0, // 语言能力序号
        qualificationIndex: 0, // 资质证书序号
        skillsIndex: 0, // 专业技能序号
        checked: false, // 同意发布
        scrollIntoViewId: '',
        bonusKey: 500, // 加分项key
        advanceOption: [], // 个人优势列表枚举
        isFixed: false,
        tabActive: 'a',
        baseInfoCount: 0, // 基本信息未填项统计
        intentionCount: 0, // 工作意向未填项统计
        educationCount: 0, // 教育经历未填项统计
        workExpCount: 0, // 工作经历未填项统计
        bonusItemCount: 0, // 加分项未填项统计
        customHonor: '', // 自定义获得荣誉
        honorCount: 0, // 自定义获得荣誉字数
        customAdvance: '', // 自定义个人优势
        advanceCount: 0, // 自定义个人优势字数
        newCurriculumVitae: {},
        studyTemIndex: 0, // 学习经历模板序号
        expTemIndex: 0, //工作经历模板序号
        currentMonth: getTimes().slice(0, 7), //当前年月
        currentYears: getTimes().slice(0, 4), //当前年月
      }
    },
    computed: {
      ...mapGetters(['userid', 'islogin', 'statusBarHeight1', 'userinfo']),
      /* 配置自定义picker渲染的数据 */
      // workingTimeColumn(){
      //   const column = [
			// 		{
			// 			suffix: '',
			// 			key: 'start',
			// 			list: [],
			// 		},
			// 	]
      //   return column;
      // },
    },
    async onLoad(option) {
		console.log(this.currentYears,'!!!!!!!!!!!!!')
      const that = this;
      uni.getSystemInfo({success(res){
        that.dro = res.safeArea.width / 750;
      }});
      // 获取微信小程序胶囊和据右边宽度
      // #ifdef MP-WEIXIN
      // 获取胶囊信息
      let menuButtonInfo = uni.getMenuButtonBoundingClientRect()
      let getWindowInfo = uni.getWindowInfo().screenWidth
      this.WXwidth = getWindowInfo - (menuButtonInfo.right - menuButtonInfo.width)
      // #endif
      if (option) {
        this.index = option.index
        this.gzjlData = uni.getStorageSync('gzjl_key')
        uni.removeStorageSync('gzjl_key')
        this.scroll = option.scroll
        // back - 1 职位类别返回完善简历
        this.back = option.back || 0
      }
      await this.getTem()
      await this.getTime()
      await this.getType() // 获取学历
      await this.getDictionaryList() // 获取薪资列表

      this.init()

      /* #ifdef H5 */
      this.jinzhi()
      /* #endif */
    },
    onShow() {
    },
    beforeDestroy() {
      //修改任何一个值，都缓存
      uni.setStorageSync('curriculumVitae', this.curriculumVitae)
    },
    onPullDownRefresh() {
      this.getData()
    },
    watch: {
      curriculumVitae: {
        handler(newVal, oldVal) {
          // console.log('complexData changed:', newVal, oldVal);

          // 重置基本信息空缺数量
          this.baseInfoCount = 0
          if (!newVal.realName) {
            this.baseInfoCount++
          }
          if (!newVal.sexualDistinction) {
            this.baseInfoCount++
          }
          if (!newVal.age) {
            this.baseInfoCount++
          }
          if (!newVal.myPhoto) {
            this.baseInfoCount++
          }

          if (!newVal.workingTime) {
            this.baseInfoCount++
          } else {
            const date = new Date()
            let year = date.getFullYear()
            newVal.experienceYears = year - newVal.workingTime
          }

          if (!newVal.age) {
            const date = new Date()
            let year = date.getFullYear()
            if (year - newVal.age > 0) {
              newVal.age = year - newVal.age
            } else {
              newVal.age = 0
            }
          }

          if (!newVal.homeAddress) {
            this.baseInfoCount++
          }
          if (!newVal.introduction) {
            this.baseInfoCount++
          }

          // 重置工作意向填写数量
          this.intentionCount = 0
          if (!newVal.intendedPosition) {
            this.intentionCount++
          }
          if (!newVal.jobStatus) {
            this.intentionCount++
          }
          if (!newVal.salaryExpectation) {
            this.intentionCount++
          }
          if (!newVal.workLocation) {
            this.intentionCount++
          }
          if (!newVal.jobType) {
            this.intentionCount++
          }

          // 重置教育经历填写数量
          this.educationCount = 0
          // console.log('newVal.graduationAcademy.', newVal.graduationAcademy);
          const graduationAcademy = newVal.graduationAcademy
          if (!graduationAcademy.schoolName) {
            this.educationCount++
          }
          if (!newVal.highestEducation) {
            this.educationCount++
          }
          if (!graduationAcademy.major) {
            this.educationCount++
          }
          if (!graduationAcademy.schoolHours) {
            this.educationCount++
          }
          if (!graduationAcademy.honorReceived || graduationAcademy.honorReceived.length == 0) {
            this.educationCount++
          }
          if (!graduationAcademy.associationActivity) {
            this.educationCount++
          }

          // 工作经历
          this.workExpCount = 0
          if (
            newVal.workExperience &&
            newVal.workExperience !== 'null' &&
            newVal.workExperience.length > 0
          ) {
            if (typeof newVal.workExperience == 'string') {
              newVal.workExperience = JSON.parse(newVal.workExperience)
            }
            newVal.workExperience.forEach((item) => {
              if (!item.corporateName) {
                this.workExpCount++
              }
              if (!item.onJobTime) {
                this.workExpCount++
              }
              if (!item.salaryRange) {
                this.workExpCount++
              }
              if (!item.positionNameText) {
                this.workExpCount++
              }

              let isChecked = false
              // console.log('item.personalAdvantage', item.personalAdvantage);
              if (typeof item.personalAdvantage == 'string') {
                item.personalAdvantage = JSON.parse(item.personalAdvantage)
              }
              item.personalAdvantage.length > 0 &&
                item.personalAdvantage.forEach((v) => {
                  if (v.checked) {
                    isChecked = true
                  }
                })
              if (!isChecked) {
                this.workExpCount++
              }
              if (!item.jobContent) {
                this.workExpCount++
              }
              // console.log('this.workExpCount', this.workExpCount);
            })
          }

          // 加分项
          this.bonusItemCount = 0
          if (newVal.bonusItem) {
            const trainingExperience = newVal.bonusItem.trainingExperience
            if (trainingExperience && trainingExperience.length > 0) {
              trainingExperience.forEach((item) => {
                if (!item.trainingInstitutions) {
                  this.bonusItemCount++
                }
                if (!item.trainingCourse) {
                  this.bonusItemCount++
                }
                if (!item.trainingTime) {
                  this.bonusItemCount++
                }
              })
            }
          }

          if (newVal.bonusItem) {
            const languageAbility = newVal.bonusItem.languageAbility
            if (languageAbility && languageAbility.length > 0) {
              languageAbility.forEach((item) => {
                if (!item.languages) {
                  this.bonusItemCount++
                }
                if (!item.listeningSpeakingAbility) {
                  this.bonusItemCount++
                }
                if (!item.readingWritingAbility) {
                  this.bonusItemCount++
                }
              })
            }
          }

          if (newVal.bonusItem) {
            const qualification = newVal.bonusItem.qualification
            if (qualification && qualification.length > 0) {
              qualification.forEach((item) => {
                if (!item.certificateName) {
                  this.bonusItemCount++
                }
                if (!item.getTime) {
                  this.bonusItemCount++
                }
              })
            }
          }

          if (newVal.bonusItem) {
            const professionalSkills = newVal.bonusItem.professionalSkills
            if (professionalSkills && professionalSkills.length > 0) {
              professionalSkills.forEach((item) => {
                if (!item.skillName) {
                  this.bonusItemCount++
                }
                if (!item.duration) {
                  this.bonusItemCount++
                }
                if (!item.mastery) {
                  this.bonusItemCount++
                }
                if (!item.certificateWorks || item.certificateWorks.length == 0) {
                  this.bonusItemCount++
                }
              })
            }
          }

          // console.log('curriculumVitae:watch', newVal);

          uni.setStorageSync('curriculumVitae', newVal)
        },
        deep: true, // 启用深度监听
        immediate: false, // 可选，是否立即以当前的绑定值触发回调
      },
    },
    methods: {
      // 返回picker的数据
			generateSequence(count,initial = 0) {
				const init = Number(initial);
				return [...Array(count).keys()].map(i => {
					const num = i + init;
					const str = num < 10 ? `0${num}` : `${num}`;
					return str;
				});
			},
      commonChange(status,key,arrKey,bonusItem){
        /** 传参解析
         * status 当前组件状态
         * key 当前组件的key名，showCommon中是字符串，其他数组中是下标
         * arrKey 当前组件依赖于curriculumVitae中的key名，目前只有工作经历
         * bonusItem 是否属于bonusItem对象中的数据
         */
        console.log(status,key,arrKey,bonusItem);
        // if (!status) return false;
        for (const i in this.showCommon) {
          if (key !== i) {
            this.showCommon[i] = false;
          }
        }
        
        const arr = [
          {
            bk: 'trainingExperience',
            sk:'plusesHoursPicker'
          },
          {
            bk: 'languageAbility',
            sk:'plusesLanguagesPicker'
          },
          {
            bk: 'qualification',
            sk:'getTimePicker'
          }
        ];
        // if ()
        arr.forEach(v => {
          this.curriculumVitae.bonusItem[v.bk].forEach((item,index) => {
            // console.log(item);
            item[v.sk] = false;
            // item[v.sk] = arrKey === v.bk && index === key;

            // this.$set(this.curriculumVitae.bonusItem[v.bk][index],v.sk,false);
          })
          // this.curriculumVitae.bonusItem[v.bk].splice(0,0);
          // this.$set(this.curriculumVitae.bonusItem,v.bk,this.curriculumVitae.bonusItem[v.bk]);
        })
        // this.$set(this,'curriculumVitae',this.curriculumVitae);
        this.selectorDistrict = false;
        this.curriculumVitae = JSON.parse(JSON.stringify(this.curriculumVitae));
      },
      changePicker(data,key,symbol){
        const that = this;
        console.log(data, key);
        const pickerKeys = {
          workingTime: 'workingTimeColumn'
        }
        const str = [];
        data.forEach((v,i) => {
          str.push(that[pickerKeys[key]][i].list[v]);
        })
        console.log(str);
        this.curriculumVitae[key] = str.join(symbol || '-');
      },
      setNodeHeight() {
        const mainH = this.mainTop;
        // console.log(mainH);
        this.toTops.forEach(v => {
          const id = `#${v.id}`;
          const query = uni.createSelectorQuery().in(this);
          // console.log(`setNodeHeight中执行的id：${id}`);
          query.select(id).boundingClientRect((data) => {
            /* 50 是后期增加的padding： 50rpx 20rpx 每个的margin值 */
            const bottom = data.bottom - mainH - Math.ceil((50 - 20) * this.dro);
            v.btm = bottom;
          }).exec();
        });
        // console.log(this.toTops);
      },
      // 该函数用于渲染待优化项。几个需要传的参数主要用于个别情况会导致没初始变量然后接口数据不传递
      changeIput(e,key1='',key2='',index2) {
        if (key1) {
          if (!this.curriculumVitae.bonusItem[key1][index2][key2]) {
            this.$set(this.curriculumVitae.bonusItem[key1][index2],key2,e.detail.value);
          }
        }
        console.log(this.curriculumVitae.bonusItem, 'curriculumVitae')
        this.bonusItemCount = 0
        const trainingExperience = this.curriculumVitae.bonusItem.trainingExperience
        if (trainingExperience && trainingExperience.length > 0) {
          trainingExperience.forEach((item) => {
            if (!item.trainingInstitutions) {
              this.bonusItemCount++
            }
            if (!item.trainingCourse) {
              this.bonusItemCount++
            }
            if (!item.trainingStartTime || !item.trainingEndTime) {
              this.bonusItemCount++
            }
          })
        }

        const languageAbility = this.curriculumVitae.bonusItem.languageAbility
        if (languageAbility && languageAbility.length > 0) {
          languageAbility.forEach((item) => {
            if (!item.languages) {
              this.bonusItemCount++
            }
            if (!item.listeningSpeakingAbility) {
              this.bonusItemCount++
            }
            if (!item.readingWritingAbility) {
              this.bonusItemCount++
            }
          })
        }

        const qualification = this.curriculumVitae.bonusItem.qualification
        if (qualification && qualification.length > 0) {
          qualification.forEach((item) => {
            if (!item.certificateName) {
              this.bonusItemCount++
            }
            if (!item.getTime) {
              this.bonusItemCount++
            }
          })
        }

        const professionalSkills = this.curriculumVitae.bonusItem.professionalSkills
        if (professionalSkills && professionalSkills.length > 0) {
          professionalSkills.forEach((item) => {
            if (!item.skillName) {
              this.bonusItemCount++
            }
            if (!item.duration) {
              this.bonusItemCount++
            }
            if (!item.mastery) {
              this.bonusItemCount++
            }
            if (!item.certificateWorks || item.certificateWorks.length == 0) {
              this.bonusItemCount++
            }
          })
        }
      },
      init() {
        // 请求数据
        this.getData()
      },
      async getData() {
        // 如果没有缓存，则请求查询接口
        const data = {
          publisherId: this.userInfo.id,
        }
        const res = await this.$myRequest.get('/api/mobile/personnelOwner/getResumeDetails', data)
        if (res.code == 200) {
          if (res.biographicalNotesDetails) {
            let obj = res.biographicalNotesDetails
            // this.curriculumVitae = obj
            // 暂时屏蔽自动保存功能，和接口返回增加的id数据相排斥
            let curriculumVitae_storage = uni.getStorageSync('curriculumVitae');
            // delete curriculumVitae_storage.graduationAcademy
            // delete curriculumVitae_storage.workExperience
            console.log('curriculumVitae_storage111', curriculumVitae_storage);

            if (Object.keys(curriculumVitae_storage).length > 0) {
              // 获取Storage缓存
              if (this.back == 1) {
                // 职位类别返回完善简历 优先使用本地缓存数据
                this.curriculumVitae = {
                  ...obj,
                  ...curriculumVitae_storage,
                }
              } else {
                delete curriculumVitae_storage.bonusItem;
                this.curriculumVitae = {
                  ...curriculumVitae_storage,
                  ...obj,
                }
              }
            } else {
              this.curriculumVitae = {
                ...obj,
              }
            }
            // 回显需要特殊处理的表单数据
            this.echoData()
          }
        }
      },
      // 回显需要特殊处理的表单数据
      echoData() {
        // console.log('this.curriculumVitae', this.curriculumVitae);
        // 回显头像
        if (this.curriculumVitae.myPhoto) {
          console.log('this.imgList.length',this.imgList.length)
          this.imgList = [this.curriculumVitae.myPhoto]
        } else {
          this.setDefaultAvator(this.curriculumVitae.sexualDistinction);
        }
		
        // 回显参加工作时间
        if (this.curriculumVitae.workingTime) {
          this.curriculumVitae.workingTime = getYear(this.curriculumVitae.workingTime)
        }
        // 回显意向职位
        if (this.curriculumVitae.intendedPosition) {
          // 意向职位回显
          this.intendedPositionText = ''
          if (this.curriculumVitae.intendedPosition) {
            let intendedPositionList = JSON.parse(this.curriculumVitae.intendedPosition)
            // console.log('intendedPositionList', typeof(intendedPositionList));
            intendedPositionList.length > 0 &&
              intendedPositionList.map((v) => {
                let itemArr = v.split(',')
                this.intendedPositionText += itemArr[itemArr.length - 1] + ' '
              })
            // console.log('intendedPositionText', this.intendedPositionText);
          }
        }
        // 回显教育经历：毕业院校、毕业时间、学历、学习经历
        if (this.curriculumVitae.graduationAcademy) {
          if (typeof this.curriculumVitae.graduationAcademy == 'string') {
            this.curriculumVitae.graduationAcademy = JSON.parse(
              this.curriculumVitae.graduationAcademy
            )
          }
          // console.log('graduationAcademy', this.curriculumVitae.graduationAcademy);
          let graduationAcademy = this.curriculumVitae.graduationAcademy
          if (graduationAcademy.schoolName) {
            graduationAcademy.schoolName = graduationAcademy.schoolName
          }
          if (graduationAcademy.schoolHours) {
            graduationAcademy.schoolHours = graduationAcademy.schoolHours
          }
          if (graduationAcademy.associationActivity) {
            this.curriculumVitae.associationActivity = graduationAcademy.associationActivity
            this.associationActivityNum = graduationAcademy.associationActivity.length
          }
          if (graduationAcademy.honorReceived) {
            if (typeof graduationAcademy.honorReceived === 'string') {
              graduationAcademy.honorReceived = graduationAcademy.honorReceived.split(',')
            }
            // 预设获得荣誉
            let presetReceived = []
            this.honorReceivedOption.map((v1) => {
              graduationAcademy.honorReceived.map((v2) => {
                if (v2 === v1.valueName) {
                  v1.checked = true
                }
              })
              presetReceived.push(v1)
            })

            // 自定义获得荣誉
            let customReceived = graduationAcademy.honorReceived.filter(
              (v2) => !this.honorReceivedOption.some((v1) => v1.valueName === v2)
            )
            // 加工成数组对象
            let customReceivedArr = []
            customReceived.map((v) => {
              // 数据格式两次返回不一样
              let item = ''
              if (typeof v == 'object') {
                item = v
                customReceivedArr.push({
                  ...item,
                  checked: true,
                })
              } else {
                customReceivedArr.push({
                  valueName: v,
                  checked: true,
                })
              }
            })
            this.honorReceivedOption = [...presetReceived, ...customReceivedArr]
          }
        }

        // 回显意向工作地址
        if (this.curriculumVitae.workLocation) {
          this.workLocationText = ''
          try {
            const workLocation = JSON.parse(this.curriculumVitae.workLocation);
            this.district[0].checked = !1;
            this.district.forEach((item1) => {
              workLocation.forEach((item2) => {
                if (item2.label === item1.label) {
                  item1.checked = true
                  this.workLocationText += item1.label + ' '
                }
              })
            })
          } catch {
            this.workLocationText = this.curriculumVitae.workLocation.join(' ')
          }
        }

        // 回显工作经历
        if (this.curriculumVitae.workExperience) {
          if (
            typeof this.curriculumVitae.workExperience === 'string' &&
            this.curriculumVitae.workExperience !== 'null'
          ) {
            // console.log('this.curriculumVitae.workExperience', this.curriculumVitae.workExperience);
            this.curriculumVitae.workExperience = JSON.parse(this.curriculumVitae.workExperience)
            let workExperience = this.curriculumVitae.workExperience
            // console.log('this.curriculumVitae.workExperience', this.curriculumVitae.workExperience);
            // 有工作经验数据
            if (Array.isArray(workExperience) && workExperience.length > 0) {
              workExperience.map((item) => {
                item.positionNameText = ''
                // console.log('item', item);

                // 回显职位
                if (item.positionName) {
                  let positionName = JSON.parse(item.positionName)
                  if (Array.isArray(positionName) && positionName.length > 0) {
                    positionName.map((v) => {
                      let itemArr = v.split(',')
                      item.positionNameText += itemArr[itemArr.length - 1] + ' '
                    })
                    // console.log('intendedPositionText', this.intendedPositionText);
                  }
                }

                // 在职时间
                // if (item.onJobTime && item.onJobTime.indexOf('|') !== -1) {
                //   const onJobTimeArr = item.onJobTime.split('|')
                //   item.startTime = onJobTimeArr[0] ? onJobTimeArr[0] : ''
                //   item.endTime = onJobTimeArr[1] ? onJobTimeArr[1] : ''
                // }
                // console.log('onJobTime', item.onJobTime);
                // console.log('item.startTime ', item.startTime);

                // 回显个人优势
                if (typeof item.personalAdvantage === 'string') {
                  // 有值就回显
                  item.personalAdvantage = JSON.parse(item.personalAdvantage)
                  // console.log('item.personalAdvantage ', item.personalAdvantage);

                  // 预设个人优势
                  let presetAdvantage = []
                  let advanceOption = this.advanceOption.map((item) => {
                    return {
                      ...item,
                      checked: false,
                    }
                  })
                  advanceOption.map((v1) => {
                    item.personalAdvantage.map((v2) => {
                      if (v1.valueName === v2.valueName) {
                        v1.checked = true
                      }
                    })
                    presetAdvantage.push(v1)
                  })
                  console.log('presetAdvantage====', presetAdvantage)

                  //自定义个人优势
                  let customAdvantage = item.personalAdvantage.filter(
                    (v2) => !this.advanceOption.some((v1) => v1.valueName === v2.valueName)
                  )
                  // console.log('customAdvantage', customAdvantage);

                  item.personalAdvantage = [...presetAdvantage, ...customAdvantage]
                } else {
                  // 没有值初始化
                  item.personalAdvantage = _.cloneDeep(this.advanceOption)
                }

                // 工作描述
                if (item.jobContent) {
                  item.jobContentNum = item.jobContent.length
                }
              })
            }
          }
          //默认开启隐藏
          this.curriculumVitae.workExperience.forEach(v => (v.onlyHide = v.onlyHide !== false ? true : false));
        } else {
          // 没有工作经验数据
          // workExperience直接赋值导致数据不是响应式，影响薪资范围picker组件无法回显
          this.$set(this.curriculumVitae, 'workExperience', [
            {
              corporateName: '',
              onlyHide: true,
              industry: '',
              jobContent: '',
              onJobTime: '',
              positionName: '[]',
              positionNameText: '',
              salaryRange: '',
              salaryRangeIndex: 4,
              startTime: '',
              personalAdvantage: [...this.advanceOption],
              workingHoursPicker: false,
              workSalaryRangePicker: false,
            },
          ])
        }
        // 加分项
        if (
          typeof this.curriculumVitae.bonusItem === 'string' &&
          this.curriculumVitae.bonusItem !== '' &&
          this.curriculumVitae.bonusItem !== 'null'
        ) {
          this.curriculumVitae.bonusItem = JSON.parse(this.curriculumVitae.bonusItem)
          // console.log('this.curriculumVitae.bonusItem1', this.curriculumVitae.bonusItem);

          this.curriculumVitae.bonusItem.trainingExperience = this.curriculumVitae.bonusItem
            .trainingExperience
            ? JSON.parse(this.curriculumVitae.bonusItem.trainingExperience)
            : []
          this.curriculumVitae.bonusItem.languageAbility = this.curriculumVitae.bonusItem
            .languageAbility
            ? JSON.parse(this.curriculumVitae.bonusItem.languageAbility)
            : []
          this.curriculumVitae.bonusItem.qualification = this.curriculumVitae.bonusItem
            .qualification
            ? JSON.parse(this.curriculumVitae.bonusItem.qualification)
            : []
          this.curriculumVitae.bonusItem.professionalSkills = this.curriculumVitae.bonusItem
            .professionalSkills
            ? JSON.parse(this.curriculumVitae.bonusItem.professionalSkills)
            : []

          if (
            Array.isArray(this.curriculumVitae.bonusItem.professionalSkills) &&
            this.curriculumVitae.bonusItem.professionalSkills.length > 0
          ) {
            this.curriculumVitae.bonusItem.professionalSkills.map((v) => {
              if (v.certificateWorks) {
                if (typeof v.certificateWorks === 'string') {
                  v.certificateWorks = JSON.parse(v.certificateWorks)
                }
                let arr = []
                v.certificateWorks.map((item) => {
                  arr.push({
                    url: item,
                  })
                })
                v.certificateWorks = arr
                // console.log('v.certificateWorks ', v.certificateWorks);
              } else {
                v.certificateWorks = []
              }
            })
          }
          // console.log('this.curriculumVitae.bonusItem', this.curriculumVitae.bonusItem);
        } else {
          this.curriculumVitae.bonusItem = {}
        }
        // 如果没值，就初始化默认值
        if (!this.curriculumVitae.bonusItem.trainingExperience) {
          //  培训经历
          this.curriculumVitae.bonusItem.trainingExperience = [
            {
              trainingInstitutions: '',
              trainingCourse: '',
              trainingTime: '',
              trainingStartTime: '2020-06',
              trainingEndTime: '',
              trainingEndTime: '',
              plusesHoursPicker: false,
            },
          ]
        } else {
          // 在职时间
          this.curriculumVitae.bonusItem.trainingExperience.map((item) => {
            if (item.trainingTime && item.trainingTime.indexOf('至') !== -1) {
              const trainingTime = item.trainingTime.split('至')
              item.trainingStartTime = trainingTime[0] ? trainingTime[0] : ''
              item.trainingEndTime = trainingTime[1] ? trainingTime[1] : ''
            }
          })
        }
        if (!this.curriculumVitae.bonusItem.languageAbility) {
          // 语言能力
          this.curriculumVitae.bonusItem.languageAbility = [
            {
              languages: '',
              listeningSpeakingAbility: '',
              readingWritingAbility: '',
              plusesLanguagesPicker: false,
            },
          ]
        }
        if (!this.curriculumVitae.bonusItem.qualification) {
          // 资质证书
          this.curriculumVitae.bonusItem.qualification = [
            {
              certificateName: '',
              getTime: '',
              getTimePicker: false,
              key: `certificateName_${Date.now()}_${Math.random()}`
            },
          ]
        }
        if (!this.curriculumVitae.bonusItem.professionalSkills) {
          // 专业技能
          this.curriculumVitae.bonusItem.professionalSkills = [
            {
              skillName: '',
              duration: '',
              mastery: '',
              certificateWorks: [],
            },
          ]
        }
        // console.log('this.curriculumVitae', this.curriculumVitae);

        this.loding = false;
        this.$nextTick(() => {
          const main = uni.createSelectorQuery().in(this);
          main.select('.main').boundingClientRect((data) => {
            this.mainTop = data.top;
            // console.log(this.mainTop);
          }).exec();
          this.setNaviScrollTabbar();
        })
        uni.stopPullDownRefresh()
      },
      setNaviScrollTabbar(){
        // 如果有滚动到指定位置
        this.scrollTop = this.scroll;
      },
      // 点击tab滚动到锚点高度
      scrollTo(id) {
        // console.log(`触发点击跳转${id}`);
        this.scrollIntoViewId = id;
        const time = setTimeout(() => {
          this.tabActive !== id && (this.tabActive = id);
          clearTimeout(time);
        },200)
        // this.tabActive = id;
      },
      // 横向滚动监听
      scroll_H: function (e) {
        // console.log(e)
        this.old.scrollTop = e.detail.scrollTop
      },
      // 设置默认头像
      setDefaultAvator(sex) {
        // 从1-5中随机取数,给一个随机的默认头像
        const index = Math.floor(Math.random() * 5) + 1
		console.log(this.curriculumVitae.sexualDistinction,'------')
        if (this.curriculumVitae.sexualDistinction == '1' || sex == '1') {
          // 男生头像
          this.curriculumVitae.myPhoto = `https://pic.bangbangtongcheng.com/static/bbzc/m${index}.png`
          this.imgList = [this.curriculumVitae.myPhoto]
        } else {
          // 女生头像
          this.curriculumVitae.myPhoto = `https://pic.bangbangtongcheng.com/static/bbzc/w${index}.png`
          this.imgList = [this.curriculumVitae.myPhoto]
        }
      },
      chooseImage(){
        this.$refs.imageUploadCropperRef.otherChooseImage();
      },
      // 图片上传成功后，需要执行一次++
      returnSuccess(){
        // this.baseInfoCount++;
        this.curriculumVitae.myPhoto = this.imgList[0];
      },
      // 获取年
      getYear(type) {
        const date = new Date()
        let year = date.getFullYear()
        if (type === 'start') {
          year = year - 60
        } else if (type === 'end') {
          year = year + 2
        }
        return year
      },
      // 获取学历类型
      getType() {
        let that = this
        this.$myRequest
          .get('/api/mobile/personnelOwner/queryDataDictionaryList', {
            type: 3,
          })
          .then((res) => {
            let type = []
            res.dataDictionaryList.forEach((el) => {
              if (el.type == 3) {
                type.push(el.valueName)
              }
            })
            this.type3.push(...type);
          })
      },
      // 获取当时薪资列表
      getDictionaryList(e) {
        this.$myRequest
          .get('/api/mobile/personnelOwner/queryDataDictionaryList', {
            type: 10,
          })
          .then((res) => {
            this.salaryExp = res.dataDictionaryList
          })
      },
      // 性别
      setSex(e) {
        // this.curriculumVitae.sexualDistinction = e
        this.$set(this.curriculumVitae, 'sexualDistinction', e)
		this.setDefaultAvator(this.curriculumVitae)
      },

      // 删除头像
      deleteImg(index) {
        /* 已采用v-modal形式，无需自己在splice */
        // this.imgList.splice(index, 1);
        this.curriculumVitae.myPhoto = ''
      },
      //选择现居地址
      changeHomeAddress(e) {
        if (e) {
          this.curriculumVitae.homeAddress = e
        }
      },
      // 打开地图
      openMap() {
        let that = this
        // this.getLocation()
        // console.log('that.curriculumVitae.latitude,', that.curriculumVitae.latitude);
        uni.chooseLocation({
          latitude: that.curriculumVitae.latitude|| that.latitude,
          longitude: that.curriculumVitae.longitude || that.longitude,
          address: that.curriculumVitae.homeAddress || '',
          success: function (res) {
            that.curriculumVitae.homeAddress = res.address
            that.curriculumVitae.latitude = res.latitude
            that.curriculumVitae.longitude = res.longitude
          },
        })
      },
      async getLocation() {
        let that = this
        that.getLocation1()
        // // #ifdef APP-PLUS
        // let isAndroid = false
        // const res = uni.getSystemInfoSync()
        // if (res.platform == 'android') {
        //   isAndroid = true
        // } else {
        //   isAndroid = false
        // }

        // if (isAndroid) {
        //   that.authorizationApp(
        //     'locationState',
        //     'android.permission.ACCESS_FINE_LOCATION',
        //     '您已关闭位置权限或获取位置信息失败',
        //     that.getLocation1()
        //   )
        // } else {
        //   that.getLocation1()
        // }
        // //  #endif
        // // #ifndef APP-PLUS
        // that.getLocation1()
        // //  #endif
      },
      async getLocation1() {
        let _this = this
        uni.showLoading({
          title: '加载中',
          mask: false,
        })
        await uni.getLocation({
          type: 'gcj02',
          // highAccuracyExpireTime: "3000",
          async success(res) {
			   console.log(res, '经纬度')
            _this.latitude = res.latitude
            _this.longitude = res.longitude
            // await _this.getAddress()
			_this.openMap()
            // _this.getFy()
          },
          fail:(res) => {
            console.log(res, '经纬度没有授权');
            this.$SHOWMODAL_TO_SETTINGS();
            uni.setStorageSync('locationState', 0)
            if (uni.getStorageSync('locationState') == 0) {
              // uni.showModal({
              //   title: '提示',
              //   content: '您已关闭位置权限或获取位置信息失败',
              //   success: function (res) {
              //     if (res.confirm) {
              //       // plus.runtime.openURL("app-settings:");
              //       if (plus.os.name === 'iOS') {
              //         plus.runtime.openURL('app-settings://')
              //       } else {
              //         var Intent = plus.android.importClass('android.content.Intent')
              //         var Settings = plus.android.importClass('android.provider.Settings')
              //         var Uri = plus.android.importClass('android.net.Uri')
              //         var mainActivity = plus.android.runtimeMainActivity()
              //         var intent = new Intent()
              //         intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS)
              //         var uri = Uri.fromParts('package', mainActivity.getPackageName(), null)
              //         intent.setData(uri)
              //         mainActivity.startActivity(intent)
              //       }
              //     } else if (res.cancel) {
              //       console.log('用户点击取消')
              //     }
              //     // _this.getFy()
              //   },
              // })
              return false
            }
          },
          complete() {
            uni.hideLoading()
          },
        })
      },

      getTem() {
        // 获取个人优势
        this.$myRequest
          .get('/api/mobile/personnelOwner/queryDataDictionaryList', {
            type: 14,
          })
          .then((res) => {
            if (res.code == 200) {
              let data = res.dataDictionaryList
              if (data && data.length > 0) {
                this.advanceOption = []
                data.map((v) => {
                  this.advanceOption.push({
                    valueName: v.valueName,
                    checked: false,
                  })
                })
                // console.log('curriculumVitae.workExperience', this.curriculumVitae);
              }
            }
          })

        // 获得荣誉列表
        this.$myRequest
          .get('/api/mobile/personnelOwner/queryDataDictionaryList', {
            type: 15,
          })
          .then((res) => {
            if (res.code == 200) {
              const len = res.dataDictionaryList.length
              if (len > 0) {
                this.honorReceivedOption = res.dataDictionaryList;
              }
            }
          })

        // 获取学习经历-示例模版
        this.$myRequest
          .get('/api/mobile/personnelOwner/queryDataDictionaryList', {
            type: 16,
          })
          .then((res) => {
            if (res.code == 200) {
              const len = res.dataDictionaryList.length
              if (len > 0) {
                this.studyList = res.dataDictionaryList
                this.associationActivityTem = res.dataDictionaryList[0].valueName
              }
            }
          })

        // 工作经历-示例模版
        this.$myRequest
          .get('/api/mobile/personnelOwner/queryDataDictionaryList', {
            type: 12,
          })
          .then((res) => {
            if (res.code == 200) {
              const len = res.dataDictionaryList.length
              if (len > 0) {
                this.workList = res.dataDictionaryList
                this.workText = res.dataDictionaryList[this.expTemIndex].valueName
              }
            }
          })
      },
      // 滚动事件,滑动到170高度，固定tab
      handleScroll(event) {
        const scrollTop = event.detail.scrollTop // 页面滚动距离
        this.old.naviST = scrollTop;
        this.setNodeHeight();
        // console.log('scrollTop：',scrollTop);
        // console.log(`触发handleScroll 当前this.tabActive：${this.tabActive}`);
        if (this.scrollTimeout) clearTimeout(this.scrollTimeout);
        this.scrollTimeout = setTimeout(() => {
          // 由于获取select是异步，所以本函数必须加个定时器
          const find = this.toTops.find(v => 1 < v.btm) || this.toTops[0];
          this.tabActive !== find.id && (this.tabActive = find.id);
          // console.log('this.toTops：',this.toTops);
          // console.log(`触发handleScroll 当前this.tabActive：${this.tabActive}，当前find.id：${find.id}`);
          clearTimeout(this.scrollTimeout);
          this.scrollTimeout = null;
        },100);
        // console.log(find.id,`v.btm`,find.btm);
        if (scrollTop > 170) {
          !this.isFixed && (this.isFixed = true);
        } else {
          this.isFixed && (this.isFixed = false);
        }
      },
      //去选择参加工作时间
      toPerfect() {
        uni.navigateTo({
          url: '/pages_recruitMoney/publish/writeResume?origin=3',
        })
      },
      // 去选择职位
      toExpeirence(maxNumber, index, scrollSection) {
        // origin-跳转页面来源， maxNumber-选择职位最大数量，workExpIndex-工作经历数组索引
        // console.log('index', index);
        // url中的index：求职类型：1-全职兼职均可，全职 ，2-兼职
        // 跳转之前保存所有数据
        this.saveData();
        let url = `/pages_recruitMoney/recruitmentInformation/selectPositionCategoryResume?index=${this.curriculumVitae.jobType !== "1"?1:0}&scroll=${this.old.naviST}&origin=3&maxNumber=${maxNumber}`
        if (index !== undefined) {
          url = `${url}&workExpIndex=${index}`
        }
        // console.log('url', url);
        uni.navigateTo({
          url: url,
        })
      },
      // 求职状态
      setJobStatus(e) {
        this.curriculumVitae.jobStatus = e
      },
      //打开选择工作区域
      openDistrict() {
        this.selectorDistrict = !this.selectorDistrict
      },
      // 选择工作地区
      chooseDistrict(v, i) {
        const checkedItems = this.district.filter((item) => item.checked);
        const count = checkedItems.length;
        if (v.checked) {
          if (count === 1) {
            // 只有一个不可取消
            uni.showToast({
              title: '请至少选择1个地区',
              icon: 'none',
              mask: true,
            })
            return false;
          }
          this.$set(this.district[i],'checked', false);
        } else {
          if (count < 3) {
            this.$set(this.district[i],'checked', true);
          } else {
            uni.showToast({
              title: '最多选择3个',
              icon: 'none',
              mask: true,
            })
          }
        }
        this.workLocationText = []
        this.district.map((v) => {
          if (v.checked) {
            this.workLocationText += v.label + ' '
          }
        })
      },
      // 求职类型
      setType(e) {
        this.curriculumVitae.jobType = e
      },

      // 选择荣誉
      chooseHonor(v, i) {
        this.honorReceivedOption[i].checked = !this.honorReceivedOption[i].checked
        let honorReceived = this.honorReceivedOption.filter((item) => item.checked)
        this.curriculumVitae.graduationAcademy = {
          ...this.curriculumVitae.graduationAcademy,
          honorReceived: honorReceived,
        }
        // console.log(this.curriculumVitae.graduationAcademy.honorReceived);
      },
      // 自定义获得荣誉
      custom() {
        this.customHonor = ''
		this.honorCount = 0
        this.$refs.bindAddFL.open()
      },
      // 关闭自定义
      bindAddFL_close() {
        this.customHonor = ''
        this.$refs.bindAddFL.close()
      },
      // 输入自定义个人优势
      addFuliInput(e) {
        // 苹果输入法会有英文字母占位，所以使用maxlength 会有bug
        if(e.detail.value.length >= 5) {
          setTimeout(() => {
            this.customHonor = e.detail.value.slice(0, 5);
            this.honorCount = this.customHonor.length;
          },100)
        }
      },
      // 完成
      confirmAdd() {
        if (this.customHonor) {
          this.honorReceivedOption.push({
            valueName: this.customHonor,
            checked: true,
          })
          let honorReceived = this.honorReceivedOption.filter((item) => item.checked)
          this.curriculumVitae.graduationAcademy = {
            ...this.curriculumVitae.graduationAcademy,
            honorReceived: honorReceived,
          }
        }
        this.bindAddFL_close()
      },

      // 自定义个人优势
      customAdvanceOpen() {
        this.customAdvance = ''
        this.advanceCount = 0;
        this.$refs.bindAddAdvance.open()
      },
      // 关闭自定义
      bindAddAdvance_close() {
        this.customAdvance = ''
        this.$refs.bindAddAdvance.close()
      },
      // 输入自定义个人优势
      addAdvanceInput(e) {
        // 苹果输入法会有英文字母占位，所以使用maxlength 会有bug
        if(e.detail.value.length >= 5) {
          setTimeout(() => {
            this.customAdvance = e.detail.value.slice(0, 5);
            this.advanceCount = this.customAdvance.length;
          },100)
        }
      },
      // 完成
      confirmAddAdvance() {
        if (this.customAdvance) {
          let workExperience = this.curriculumVitae.workExperience
          workExperience[this.workExpIndex].personalAdvantage.push({
            valueName: this.customAdvance,
            checked: true,
          })
          this.curriculumVitae.workExperience = [...workExperience]
        }
        this.bindAddAdvance_close()
      },
      // 选择个人优势
      chooseAdvantage(index, v, i) {
        const newWorkExperience = this.curriculumVitae.workExperience.map((exp, idx) => {
          if (idx === index) {
            // 对于匹配的索引，返回一个新的 personalAdvantage 数组
            return {
              ...exp, // 复制其他属性
              personalAdvantage: exp.personalAdvantage.map(
                (adv) =>
                  adv.valueName === v.valueName
                    ? {
                        valueName: adv.valueName,
                        checked: !adv.checked,
                      }
                    : adv // 条件性地更新 checked 属性
              ),
            }
          }
          return exp // 对于其他元素，直接返回原始对象（实际上这里应该是深拷贝以避免引用问题，但如果原始对象不被修改则无需担心）
        })

        // 更新 curriculumVitae 的 workExperience 属性
        this.curriculumVitae.workExperience = newWorkExperience
        setTimeout(() => {
          this.workExpKey++
        }, 100)
      },
      // 学习经历模版
      popTemShow() {
        this.$refs.popTem.open();
        this.show.popTem = !0;
      },
      popTemHide() {
        this.$refs.popTem.close();
        this.show.popTem = !1;
      },
      // 学习经历-使用此模板
      useTem() {
        let text;
        if (this.associationActivityTem.length <= 2000) {
          text = this.associationActivityTem;
        } else {
          text = this.associationActivityTem.slice(0,2000);
        }
        this.curriculumVitae.graduationAcademy.associationActivity = text;
        this.associationActivityNum =
          this.curriculumVitae.graduationAcademy.associationActivity.length
        // console.log('associationActivityTem', typeof this.associationActivityTem);
        this.popTemHide()
        setTimeout(() => {
          this.educationKey++
        }, 100)
      },
      // 学习经历-换一个
      changeTem() {
        const len = this.studyList.length
        if (this.studyTemIndex >= len - 1) {
          this.studyTemIndex = 0
        } else {
          this.studyTemIndex++
        }
        this.associationActivityTem = this.studyList[this.studyTemIndex].valueName
      },
      // 学习经历 - 文本框输入
      learningInput(e) {
        this.associationActivityNum = e.detail.value.length >= 2000 ? 2000 : e.detail.value.length;
      },
      // 工作描述 - 文本框输入
      jobInput(index) {
        let workItem = this.curriculumVitae.workExperience[index]
        workItem.jobContentNum = workItem.jobContent.length >= 2000 ? 2000 : workItem.jobContent.length;
        this.$set(this.curriculumVitae.workExperience, index, workItem)
      },

      //获取当前日期
      getTime() {
        let myDate = new Date()
        const year = myDate.getFullYear()
        let month = myDate.getMonth() + 1
        let yearArr = []
        let monthArr = []
        for (var i = 1990; i <= year; i++) {
          yearArr.unshift(i)
          let j = i == year ? month : '12'
          let months_arr = []
          for (let s = 1; s <= j; s++) {
            months_arr.unshift(s)
          }
          monthArr.unshift(months_arr)
        }
        this.workHours.push(yearArr)
        this.workHours.push(monthArr[0])
        this.workHours_month = monthArr
        let yearArrs = JSON.parse(JSON.stringify(yearArr))
        let monthArrs = JSON.parse(JSON.stringify(monthArr))
        yearArrs.unshift('至今')
        monthArrs.unshift(['至今'])
        this.workHours2.push(yearArrs)
        this.workHours2.push(monthArrs[0])
        this.workHours2_month = monthArrs
      },
      // 更新工作经历数组索引
      updateWorkExpIndex(index) {
        // console.log('workExpIndex', index);
        this.workExpIndex = index
      },

      // 对这家公司隐藏我的信息
      switchChange: function (e) {
        console.log('e', e)
        uni.showModal({
          content: e ? '确定要打开吗' : '确定要关闭吗',
          success: (res) => {
            if (res.confirm) {
              // console.log('this.workExpIndex]', this.workExpIndex);
              let workExperience = _.cloneDeep(this.curriculumVitae.workExperience)
              workExperience[this.workExpIndex].onlyHide = e
              this.curriculumVitae.workExperience = [...workExperience]
              // console.log(this.curriculumVitae.workExperience[this.workExpIndex]);
            }
          },
        })
      },
      // 添加工作经历
      addWorkEpx() {
        if (this.curriculumVitae.workExperience.length >= 5) {
          uni.showToast({
            title: '最多添加5条工作经历',
            icon: 'none',
            mask: true,
          })
          return
        }
        this.advanceOption = this.advanceOption.map((item) => {
          return {
            ...item,
            checked: false,
          }
        })
        const newItem = {
          corporateName: '',
          onlyHide: true,
          industry: '',
          jobContent: '',
          onJobTime: '',
          positionName: '[]',
          positionNameText: '',
          salaryRange: '',
          salaryRangeIndex: 4,
          startTime: '',
          personalAdvantage: [...this.advanceOption],
          workingHoursPicker: false,
          workSalaryRangePicker: false,
        }
        this.curriculumVitae.workExperience.push(newItem);
        //更新storage
        let curriculumVitae = {
          ...this.curriculumVitae,
        }
        curriculumVitae.workExperience = JSON.stringify(this.curriculumVitae.workExperience)
        uni.setStorageSync('curriculumVitae', curriculumVitae)
      },

      // 在职开始时间
      changeStartTime(e) {
        const endTime = this.curriculumVitae.workExperience[this.workExpIndex].endTime
        if (endTime && endTime < e.detail.value) {
          uni.showToast({
            title: '入职时间不能大于离职时间',
            icon: 'none',
            mask: true,
          })
          return
        }
        let workExperience = _.cloneDeep(this.curriculumVitae.workExperience)
        workExperience.map((v, i) => {
          if (i == this.workExpIndex) {
            v.startTime = e.detail.value
          }
        })
        this.curriculumVitae.workExperience = workExperience
        setTimeout(() => {
          this.workExpKey++
        }, 0)
      },
      // 在职结束时间
      changeEndTime(e) {
        const startTime = this.curriculumVitae.workExperience[this.workExpIndex].startTime
        if (startTime && startTime > e.detail.value) {
          uni.showToast({
            title: '入职时间不能大于离职时间',
            icon: 'none',
            mask: true,
          })
          return
        }

        let workExperience = _.cloneDeep(this.curriculumVitae.workExperience)
        workExperience.map((v, i) => {
          if (i == this.workExpIndex) {
            v.endTime = e.detail.value
          }
        })
        this.curriculumVitae.workExperience = workExperience
        setTimeout(() => {
          this.workExpKey++
        }, 0)
      },
      // 删除工作经历
      deleteWorkEpx(index) {
        uni.showModal({
          content: `确定要删除第${index + 1}条工作经历吗？`,
          success: (res) => {
            if (res.confirm) {
              // this.curriculumVitae.workExperience = this.curriculumVitae.workExperience.filter(
              //   (_, i) => i !== index
              // )
              this.curriculumVitae.workExperience.splice(index,1);
              // 更新storage
              let curriculumVitae = {
                ...this.curriculumVitae,
              }
              curriculumVitae.workExperience = JSON.stringify(this.curriculumVitae.workExperience)
              uni.setStorageSync('curriculumVitae', curriculumVitae)
            }
          },
        })
      },
      // 工作经历模版
      popWorkTemShow() {
        this.$refs.popWorkTem.open();
        this.show.popWorkTem = !0;
      },
      popWorkTemHide() {
        this.$refs.popWorkTem.close();
        this.show.popWorkTem = !1;
      },
      // 工作经历-使用此模板
      useWorkTem() {
        let text;
        if (this.workText.length <= 2000) {
          text = this.workText;
        } else {
          text = this.workText.slice(0,2000);
        }
        this.curriculumVitae.workExperience[this.workExpIndex].jobContent = text;
        this.curriculumVitae.workExperience[this.workExpIndex].jobContentNum =
          this.curriculumVitae.workExperience[this.workExpIndex].jobContent.length
        this.popWorkTemHide()
        setTimeout(() => {
          this.workExpKey++
        }, 100)
      },
      // 工作经历-换一个
      changeWorkTem() {
        const len = this.workList.length
        if (this.expTemIndex >= len - 1) {
          this.expTemIndex = 0
        } else {
          this.expTemIndex++
        }
        this.workText = this.workList[this.expTemIndex].valueName;
      },
      // 更新培训经历数组索引
      updateTrianingIndex(index) {
        this.trianingIndex = index
        // console.log('index', index);
      },

      // 新增培训经历
      addTrianing() {
        if (this.curriculumVitae.bonusItem.trainingExperience.length >= 5) {
          uni.showToast({
            title: '最多添加5条培训经历',
            icon: 'none',
            mask: true,
          })
          return
        }
        const newItem = {
          trainingInstitutions: '',
          trainingCourse: '',
          trainingTime: '',
          trainingStartTime: '',
          trainingEndTime: '',
          plusesHoursPicker: false,
        }
        this.curriculumVitae.bonusItem.trainingExperience.push(newItem)
        // 更新storage
        let curriculumVitae = _.cloneDeep(this.curriculumVitae)
        curriculumVitae.bonusItem = JSON.stringify(this.curriculumVitae.bonusItem)
        uni.setStorageSync('curriculumVitae', curriculumVitae)
        setTimeout(() => {
          this.bonusKey++
        }, 500)
      },
      // 删除培训经历
      deleteTrianing(index) {
        uni.showModal({
          content: `确定要删除第${index + 1}条培训经历吗？`,
          success: (res) => {
            if (res.confirm) {
              // this.curriculumVitae.bonusItem.trainingExperience =
              //   this.curriculumVitae.bonusItem.trainingExperience.filter((_, i) => i !== index)
              this.curriculumVitae.bonusItem.trainingExperience.splice(index,1);
              // 更新storage
              let curriculumVitae = _.cloneDeep(this.curriculumVitae)

              curriculumVitae.bonusItem = JSON.stringify(this.curriculumVitae.bonusItem)
              setTimeout(() => {
                this.bonusKey++
              }, 500)
            }
          },
        })
      },
      // 选择听说能力
      setListen(index, type) {
        const dataType = this.curriculumVitae.bonusItem.languageAbility[index].listeningSpeakingAbility;
        this.curriculumVitae.bonusItem.languageAbility[index].listeningSpeakingAbility = dataType === type ? '' : type;
        setTimeout(() => {
          this.workExpKey++
        }, 500)
        this.changeIput()
      },
      // 选择读写能力
      setRead(index, type) {
        const dataType = this.curriculumVitae.bonusItem.languageAbility[index].readingWritingAbility;
        this.curriculumVitae.bonusItem.languageAbility[index].readingWritingAbility = dataType === type ? '' : type;
        setTimeout(() => {
          this.workExpKey++
        }, 500)
        this.changeIput()
      },
      // 更新语言能力数组索引
      updateLanguagesIndex(e) {
        this.languageIndex = e
        this.changeIput()
      },
      // 增加语言能力
      addLanguages() {
        if (this.curriculumVitae.bonusItem.languageAbility.length >= 5) {
          uni.showToast({
            title: '最多添加5条语言能力',
            icon: 'none',
            mask: true,
          })
          return
        }
        const newItem = {
          languages: '',
          listeningSpeakingAbility: '',
          readingWritingAbility: '',
          plusesLanguagesPicker: false,
        }
        this.curriculumVitae.bonusItem.languageAbility.push(newItem)
        //更新storage
        let curriculumVitae = {
          ...this.curriculumVitae,
        }
        curriculumVitae.bonusItem = JSON.stringify(this.curriculumVitae.bonusItem)
        uni.setStorageSync('curriculumVitae', curriculumVitae)
        setTimeout(() => {
          this.bonusKey++
        }, 500)
      },
      // 删除语言能力
      deleteLanguages(index) {
        uni.showModal({
          content: `确定要删除第${index + 1}条语言能力吗？`,
          success: (res) => {
            if (res.confirm) {
              // this.curriculumVitae.bonusItem.languageAbility =
              //   this.curriculumVitae.bonusItem.languageAbility.filter((_, i) => i !== index)
              this.curriculumVitae.bonusItem.languageAbility.splice(index,1);
              // 更新storage
              let curriculumVitae = {
                ...this.curriculumVitae,
              }
              curriculumVitae.bonusItem = JSON.stringify(this.curriculumVitae.bonusItem)
              setTimeout(() => {
                this.bonusKey++
              }, 500)
            }
          },
        })
      },
      // 更新资质证书索引
      updateQualificationIndex(e) {
        this.qualificationIndexndex = e
      },
      // 增加资质证书
      addQualification() {
        if (this.curriculumVitae.bonusItem.qualification.length >= 5) {
          uni.showToast({
            title: '最多添加5条资质证书',
            icon: 'none',
            mask: true,
          })
          return
        }
        const newItem = {
          getTime: '',
          qualificationName: '',
          getTimePicker: false,
          key: `certificateName_${Date.now()}_${Math.random()}`
        }
        this.curriculumVitae.bonusItem.qualification.push(newItem);
        //更新storage
        let curriculumVitae = {
          ...this.curriculumVitae,
        }
        curriculumVitae.bonusItem = JSON.stringify(this.curriculumVitae.bonusItem)
        uni.setStorageSync('curriculumVitae', curriculumVitae);
        setTimeout(() => {
          this.bonusKey++
        }, 500)
      },
      // 删除资质证书
      deleteQualification(index) {
        uni.showModal({
          content: `确定要删除第${index + 1}条资质证书吗？`,
          success: (res) => {
            if (res.confirm) {
              this.curriculumVitae.bonusItem.qualification.splice(index,1);
              this.$set(this,'curriculumVitae',this.curriculumVitae);
              // 更新storage
              let curriculumVitae = {
                ...this.curriculumVitae,
              }
              curriculumVitae.bonusItem = JSON.stringify(this.curriculumVitae.bonusItem)
              uni.setStorageSync('curriculumVitae', curriculumVitae);
              setTimeout(() => {
                this.bonusKey++
              }, 500)
            }
          },
        })
      },

      // 设置专业技能掌握程度
      setMastery(index, type) {
        const dataType = this.curriculumVitae.bonusItem.professionalSkills[index].mastery;
        this.curriculumVitae.bonusItem.professionalSkills[index].mastery = dataType === type ? '' : type;
        setTimeout(() => {
          this.bonusKey++
        }, 500)
        this.changeIput()
      },
      // 更新专业技能索引
      updateSkillsIndex(e) {
        this.skillsIndex = e
      },
      // 增加专业技能
      addSkills() {
        if (this.curriculumVitae.bonusItem.professionalSkills.length >= 5) {
          uni.showToast({
            title: '最多添加5条专业技能',
            icon: 'none',
            mask: true,
          })
          return
        }
        const newItem = {
          skillName: '',
          duration: '',
          mastery: '',
          certificateWorks: [],
        }
        this.curriculumVitae.bonusItem.professionalSkills.push(newItem)
        //更新storage
        let curriculumVitae = {
          ...this.curriculumVitae,
        }
        curriculumVitae.bonusItem = JSON.stringify(this.curriculumVitae.bonusItem)
        setTimeout(() => {
          this.bonusKey++
        }, 500)
      },
      // 删除技能
      deleteSkills(index) {
        uni.showModal({
          content: `确定要删除第${index + 1}条专业技能吗？`,
          success: (res) => {
            if (res.confirm) {
              // this.curriculumVitae.bonusItem.professionalSkills =
              //   this.curriculumVitae.bonusItem.professionalSkills.filter((_, i) => i !== index)
              this.$set(this.curriculumVitae.bonusItem.professionalSkills[index],'skillName','');
              this.curriculumVitae.bonusItem.professionalSkills.splice(index,1);
              // 更新storage
              let curriculumVitae = {
                ...this.curriculumVitae,
              }
              curriculumVitae.bonusItem = JSON.stringify(this.curriculumVitae.bonusItem)
              setTimeout(() => {
                this.bonusKey++
              }, 500)
            }
          },
        })
      },

      // 旧代码------------------------------------
      handleTouchStart(event) {
        // 记录开始触摸的Y坐标
        this.startY = event.touches[0].clientY
      },
      handleTouchMove(event) {
        // 当前触摸的Y坐标
        const currentY = event.touches[0].clientY
        // 计算滑动的距离
        const distance = currentY - this.startY
        // 根据滑动的距离判断是上滑还是下滑
        if (distance > 6) {
          // 上滑操作
          this.isViewVisible = true
        } else if (distance < -6) {
          // 下滑操作
          this.isViewVisible = false;
        }
      },
      handleTouchEnd() {
        // 可以在这里做一些触摸结束后的处理
      },
      // 同意隐私政策和用户协议
      changeAgree() {
        this.checked = !this.checked
      },
      // 对谁可见
      setVisibleRange(e) {
        this.curriculumVitae.visibleRange = e
      },
      toUs(type) {
        uni.navigateTo({
          url: '/pages_my/Us?type=' + type,
        })
      },
      // 保存所有数据到Storage
      saveData() {
        let newCurriculumVitae = _.cloneDeep(this.curriculumVitae)
        delete newCurriculumVitae.resumeTitle
        delete newCurriculumVitae.personalAdvantages
        delete newCurriculumVitae.userInformation

        if (!newCurriculumVitae.reasonRejection) {
          delete newCurriculumVitae.reasonRejection
        }
        if (!newCurriculumVitae.remarks) {
          delete newCurriculumVitae.remarks
        }
        // 头像取值
        if (!newCurriculumVitae.myPhoto&&this.imgList[0]) {
          newCurriculumVitae.myPhoto = this.imgList[0] || '';
        }
        newCurriculumVitae.myPhoto === undefined && (newCurriculumVitae.myPhoto = '');
        // 教育经历-获得荣誉
        if (newCurriculumVitae.graduationAcademy) {
          let honorReceived = ''
          if (newCurriculumVitae.graduationAcademy.honorReceived) {
            let len = newCurriculumVitae.graduationAcademy.honorReceived.length
            newCurriculumVitae.graduationAcademy.honorReceived.map((item, index) => {
              if (index == len - 1) {
                honorReceived += item.valueName || item
              } else {
                honorReceived += `${item.valueName || item},`
              }
            })
            newCurriculumVitae.graduationAcademy.honorReceived = honorReceived
          }
          if (newCurriculumVitae.graduationAcademy.id == '') {
            newCurriculumVitae.graduationAcademy.id = null
          }
          newCurriculumVitae.graduationAcademy = JSON.stringify(
            newCurriculumVitae.graduationAcademy
          )
        }

        // 删除值为空的字段属性:这里为了配合后端，凡是用户没有填的值都不传，传空都不行,否则后端会计算为简历完成度百分比
        // 工作经历
        if (newCurriculumVitae.workExperience) {
          // 删除空值字段
          newCurriculumVitae.workExperience.map((v) => {
            // 如果没有填写公司名称，则删除onlyHide字段
            if (!v.corporateName) {
              delete v.onlyHide
            }

            // 加工个人优势
            v.personalAdvantage = v.personalAdvantage.filter((item) => item.checked)
            if (v.personalAdvantage.length > 0) {
              v.personalAdvantage = JSON.stringify(v.personalAdvantage)
            } else {
              delete v.personalAdvantage
            }

            // // 加工在职时间
            // if (v.startTime && v.endTime) {
            //   v.onJobTime = `${v.startTime}|${v.endTime}`
            // } else {
            //   delete v.onJobTime
            // }

            Object.keys(v).forEach((key) => {
              if (
                v[key] === '' ||
                v[key] === undefined ||
                (Array.isArray(v[key]) && v[key].length === 0) ||
                v[key] === null ||
                v[key] === '[]'
              ) {
                delete v[key]
              }
            })
            // 清理不要的字段

            // delete v.id
            delete v.biographicalNotesId
            delete v.createBy
            delete v.createDate
            delete v.updateBy
            delete v.updateDate
            delete v.deleteFlag
            delete v.whetherDraft
            delete v.startTime
            delete v.endTime
          })
          // console.log('newCurriculumVitae1', newCurriculumVitae);
          // 如果一个值都没有，就删除workExperience字段
          if (JSON.stringify(newCurriculumVitae.workExperience[0]) === '{}') {
            delete newCurriculumVitae.workExperience
          } else if (newCurriculumVitae.workExperience.length === 0) {
            delete newCurriculumVitae.workExperience
          } else {
            newCurriculumVitae.workExperience = JSON.stringify(newCurriculumVitae.workExperience)
          }
        }

        // 加分项
        if (newCurriculumVitae.bonusItem) {
          // delete newCurriculumVitae.bonusItem.id
          delete newCurriculumVitae.bonusItem.biographicalNotesId
          delete newCurriculumVitae.bonusItem.publisherId
          delete newCurriculumVitae.bonusItem.createBy
          delete newCurriculumVitae.bonusItem.createDate
          delete newCurriculumVitae.bonusItem.updateBy
          delete newCurriculumVitae.bonusItem.updateDate
          delete newCurriculumVitae.bonusItem.deleteFlag


          // for (const k in bonKeys) {
          //   if (bonKeys[k]) 
          // }


          // 加工培训经历
          if (newCurriculumVitae.bonusItem.trainingExperience) {
            const array = this.dataCleaning(
              newCurriculumVitae.bonusItem.trainingExperience,
              'trainingExperience'
            )
            if (array.length === 0 || JSON.stringify(array[0]) === '{}') {
              delete newCurriculumVitae.bonusItem.trainingExperience
            } else {
              newCurriculumVitae.bonusItem.trainingExperience = JSON.stringify(array)
            }
          }
          // 加工语言能力
          if (newCurriculumVitae.bonusItem.languageAbility) {
            const array = this.dataCleaning(
              newCurriculumVitae.bonusItem.languageAbility,
              'languageAbility'
            )
            if (array.length === 0 || JSON.stringify(array[0]) === '{}') {
              delete newCurriculumVitae.bonusItem.languageAbility
            } else {
              newCurriculumVitae.bonusItem.languageAbility = JSON.stringify(array)
            }
          }
          // 加工资质证书
          if (newCurriculumVitae.bonusItem.qualification) {
            const array = this.dataCleaning(
              newCurriculumVitae.bonusItem.qualification,
              'qualification'
            )
            if (array.length === 0 || JSON.stringify(array[0]) === '{}') {
              delete newCurriculumVitae.bonusItem.qualification
            } else {
              newCurriculumVitae.bonusItem.qualification = JSON.stringify(array)
            }
          }
          // 加工专业技能
          if (newCurriculumVitae.bonusItem.professionalSkills) {
            const array = this.dataCleaning(
              newCurriculumVitae.bonusItem.professionalSkills,
              'professionalSkills'
            )
            if (array.length === 0 || JSON.stringify(array[0]) === '{}') {
              delete newCurriculumVitae.bonusItem.professionalSkills
            } else {
              array.map((v) => {
                if (v.certificateWorks) {
                  let arr = []
                  v.certificateWorks.map((item) => {
                    arr.push(item.url)
                  })
                  v.certificateWorks = JSON.stringify(arr)
                } else {
                  v.certificateWorks = JSON.stringify([])
                }
              })
              newCurriculumVitae.bonusItem.professionalSkills = JSON.stringify(array)
            }
          }

          // 如果加分项值全空，则删除字段
          if (
            JSON.stringify(newCurriculumVitae.bonusItem) === '{}' ||
            !newCurriculumVitae.bonusItem
          ) {
            // newCurriculumVitae.bonusItem = {
            // 	trainingExperience: [],
            // 	languageAbility: [],
            // 	qualification: [],
            // 	professionalSkills: [{
            // 		skillName: '',
            // 		duration: '',
            // 		mastery: '',
            // 		certificateWorks: []
            // 	}],
            // }

            // newCurriculumVitae.bonusItem = JSON.stringify(newCurriculumVitae.bonusItem)
            newCurriculumVitae.bonusItem = ''
          } else {
            newCurriculumVitae.bonusItem = JSON.stringify(newCurriculumVitae.bonusItem)
          }
        }
        // 处理工作区域
        let workLocation = []
        this.district.forEach((item) => {
          if (item.checked) {
            workLocation.push(item)
          }
        })
        newCurriculumVitae.workLocation = JSON.stringify(workLocation)

        // console.log('newCurriculumVitae.bonusItem', newCurriculumVitae.bonusItem);
        delete newCurriculumVitae.dateIndex
        // delete newCurriculumVitae.bonusItem
        uni.setStorageSync('curriculumVitae', newCurriculumVitae)
        this.newCurriculumVitae = newCurriculumVitae
      },
      // 数据清洗函数
      dataCleaning(array, key) {
        // 删除空值字段
        array.map((v) => {
          Object.keys(v).forEach((key) => {
            if (
              v[key] === '' ||
              v[key] === undefined ||
              (Array.isArray(v[key]) && v[key].length === 0) ||
              v[key] === null ||
              v[key] === '[]'
            ) {
              delete v[key]
            }
          })
          // delete v.id
          // delete v.bonusId
          // delete v.publisherId
          delete v.createBy
          delete v.createDate
          delete v.updateBy
          delete v.updateDate
          delete v.deleteFlag
        })
        return array
      },

      // 处理为空的数据
      setCurriculumVitaeData(){
        
        // 客户提出需要处理保存的时候为空的数据移除，发布前 过滤一遍数据，为空的移除
        // const newWork = [...curriculumVitae.workExperience];
        this.curriculumVitae.workExperience = this.curriculumVitae.workExperience.filter(v=> v.corporateName);
        // 需要处理的数据keys
        const bonKeys = [
          {
            name: 'trainingExperience',
            keys: ['trainingInstitutions','trainingCourse','trainingTime'], //培训 机构、课程、时间
          },
          {
            name: 'languageAbility',
            keys: ['languages','listeningSpeakingAbility','readingWritingAbility'], // 语言 名称、听说能力、读写能力
          },
          {
            name: 'qualification',
            keys: ['certificateName','trainingTime'], // 资质证书 名称、时间
          },
          {
            name: 'professionalSkills',
            keys: ['skillName','duration','mastery','certificateWorks'], // 专业技能 名称、年限、程度、作品
          },
        ]

        const newBonusItem = {...this.curriculumVitae.bonusItem};

        bonKeys.forEach(({ name, keys }) => {
          const list = newBonusItem[name];
          if (Array.isArray(list) && list.length) {
            // 过滤出有效项：至少有一个 key 有值
            const filtered = list.filter(item =>
            // 数据中有数组格式
              keys.some(key => {
                if (Array.isArray(item[key])) return !!item[key].length;
                return item[key] != null && item[key] !== '' && item[key] !== undefined;
              })
            );

            if (filtered.length) {
              newBonusItem[name] = filtered;
            } else {
              delete newBonusItem[name];
            }
          } else {
            delete newBonusItem[name]; // 为空数组也直接删除
          }
        });
        console.log(this.curriculumVitae.bonusItem,'---------------原本数据');
        console.log(newBonusItem,'---------------处理后');

        this.curriculumVitae.bonusItem = newBonusItem;

      },

      // 确认发布
      stepSubmit() {
        if (!this.checked) {
          uni.showToast({
            title: '请先同意隐私政策和用户协议',
            icon: 'none',
            mask: true,
          })
          return
        }

        if (!this.imgList.length) {
          // this.setDefaultAvator(this.curriculumVitae.sexualDistinction);
        }
        // 保存所有数据到Storage
        this.setCurriculumVitaeData();
        this.saveData();
        if (!this.newCurriculumVitae.realName) {
          uni.showToast({
            title: '请填写姓名',
            icon: 'none',
          })
          return
        }

        if (!this.newCurriculumVitae.age) {
          uni.showToast({
            title: '请填写年龄',
            icon: 'none',
          })
          return
        }
        if (!this.newCurriculumVitae.homeAddress) {
          uni.showToast({
            title: '请填写现居地址',
            icon: 'none',
          })
          return
        }
        // 培训经历-培训结束时间验证
        let trainingExperience
        let professionalSkills
        if (this.newCurriculumVitae.bonusItem) {
          let bonusItem = JSON.parse(this.newCurriculumVitae.bonusItem)
          if (bonusItem.trainingExperience) {
            trainingExperience = JSON.parse(bonusItem.trainingExperience)
          }
          if (bonusItem.professionalSkills) {
            professionalSkills = JSON.parse(bonusItem.professionalSkills)
          }
        }
        // if (trainingExperience) {
          // debugger;
          // let arr = trainingExperience.filter((item) => !item.trainingTime)
          // if (arr.length > 0) {
          //   uni.showToast({
          //     title: '请选择培训结束时间',
          //     icon: 'none',
          //   })
          //   return
          // }
        // }
        this.newCurriculumVitae.publisherId = this.userInfo.id
        this.newCurriculumVitae.auditNum = 2 // 1 - 第一次填写简历 2 - 第n次完善简历
        this.$myRequest
          .post('/api/mobile/personnelOwner/publishOrEditResume', this.newCurriculumVitae)
          .then((res) => {
            if (res.code == 200) {
              // 清楚缓存，从接口中获取最新简历数据
              uni.removeStorageSync('curriculumVitae')
              this.$refs.binds.open()
              setTimeout(() => {
                this.$refs.binds.close()
                uni.switchTab({
                  url: '/pages/my/index',
                })
              }, 3000)
            }
          })
      },
      // 证书/作品 上传图片
      async afterRead(event) {
        console.log('event', event)
        event.file.forEach(async (v) => {
          let result = await this.uploadFilePromise(v.url);
          console.log('result', result);
          if (result) {
            let newCertificateWorks =
              this.curriculumVitae.bonusItem.professionalSkills[this.skillsIndex].certificateWorks
            newCertificateWorks = [
              ...newCertificateWorks,
              {
                url: result[0].url,
              },
            ]
            console.log('newCertificateWorks', newCertificateWorks)

            this.$set(
              this.curriculumVitae.bonusItem.professionalSkills[this.skillsIndex],
              'certificateWorks',
              newCertificateWorks
            )

            setTimeout(() => {
              this.bonusKey++
            }, 0)
            console.log('this.curriculumVitae.bonusItem', this.curriculumVitae.bonusItem)
          }
        })
      },
      // 上传文件
      uploadFilePromise(url) {
        return new Promise((resolve, reject) => {
          let a = uni.uploadFile({
            url: 'https://www.bangbangtongcheng.com/conven/ht/attach/qnUpload',
            filePath: url,
            name: 'file',
            success: (res) => {
              console.log('res', res)
              resolve(JSON.parse(res.data).data)
            },
          })
        })
      },

      // 删除图片
      deletePic(event) {
        // console.log('this.skillsIndex', this.skillsIndex);
        // console.log('index', event.index);
        const newCertificateWorks = this.curriculumVitae.bonusItem.professionalSkills[
          this.skillsIndex
        ].certificateWorks.filter((item, itemIndex) => {
          return itemIndex !== event.index
        })
        // console.log('newCertificateWorks', newCertificateWorks);
        this.$set(
          this.curriculumVitae.bonusItem.professionalSkills[this.skillsIndex],
          'certificateWorks',
          newCertificateWorks
        )
        setTimeout(() => {
          this.bonusKey++
        }, 0)
      },
      // 旧代码 ---------
      goBack(index) {
        let pages = getCurrentPages()
        this.saveData();
        if (pages.length > 1) {
          uni.navigateBack({
            delta: 1,
          })
        } else {
          uni.switchTab({
            url: '/pages/my/index',
          })
        }
      },

      jinzhi() {
        let _this = this
        let param = window.location.href.split('#')[0]
        uni.request({
          method: 'post',
          data: {
            url: param,
          },
          header: {
            'content-type': 'application/x-www-form-urlencoded',
          },
          url: 'https://www.bangbangtongcheng.com/conven//mob/login/getJsTicket.do',
          success(re) {
            _this.jinzhifx(re.data)
          },
        })
      },
      jinzhifx(data) {
        wxshare.config({
          debug: false, //是否打开调试
          appId: data.appId, // 公众号的唯一标识
          timestamp: data.timestamp, // 生成签名的时间戳
          nonceStr: data.nonce, // ，生成签名的随机串
          signature: data.signature, // 签名
          jsApiList: ['hideMenuItems'],
        })
        // 禁止分享
        wxshare.hideMenuItems({
          // 要隐藏的菜单项，只能隐藏“传播类”和“保护类”按钮，所有menu项见附录3
          menuList: [
            'menuItem:share:appMessage',
            'menuItem:share:timeline',
            'menuItem:share:timeline',
            'menuItem:share:qq',
            'menuItem:favorite',
            'menuItem:share:QZone',
            'menuItem:openWithSafari',
          ],
        })
      },
    },
  }
</script>
<style lang="less" scoped>
  .box {
    padding-top: 100rpx;
    width: 100%;
    height: 100vh;
    background: #f5f7f9;
  }

  .head {
    padding: 20rpx;
    width: 100%;
    height: 100rpx;

    .title {
      display: flex;
      justify-content: start;
      align-items: center;
      width: 100%;
      height: 60rpx;
    }

    .fanhui {
      width: 30rpx;
      height: 30rpx;
    }

    .title-text {
      position: relative;
      margin-left: 10rpx;
      width: 100%;
      font-size: 32rpx;
      line-height: 32rpx;
      font-weight: 500;
      color: #000;
      display: flex;
      align-items: center;

      .view-resume {
        position: absolute;
        // top: 10rpx;
        left: 50%;
        transform: translateX(-50%);
        // padding-top: 8rpx;
        width: 130rpx;
        height: 40rpx;
        background: #ffffff;
        border-radius: 22rpx;
        // font-weight: 500;
        font-size: 24rpx;
        line-height: 24rpx;
        color: #0fa291;
      }
    }

    .head_right {
      font-size: 30rpx;
      font-weight: 400;
      color: #ffffff;
    }
  }

  .main {
    height: calc(100vh - 200rpx);
  }

  .tips {
    padding-left: 20rpx;
    width: 100%;
    height: 56rpx;
    line-height: 56rpx;
    font-weight: 400;
    font-size: 24rpx;
    color: #000000;
    background: rgba(255, 77, 46, 0.1);
  }

  .scroll-view_H {
    padding: 30rpx 0;
    white-space: nowrap;
    width: 100%;
    background: #fff;

    .scroll-view-item_H {
      margin: 0 20rpx;
      display: inline-block;
      width: 180rpx;
      height: 70rpx;
      line-height: 70rpx;
      text-align: center;
      font-weight: 400;
      font-size: 28rpx;
      color: #333333;
      background: url('https://pic.bangbangtongcheng.com/static/bbzc/perfect-section-bg.png') center
        no-repeat;
      background-size: cover;

      .tabs-text {
        position: relative;
        display: inline-block;

        .badge {
          position: absolute;
          top: 0;
          right: -24rpx;
          width: 30rpx;
          height: 30rpx;
          line-height: 30rpx;
          text-align: center;
          font-size: 24rpx;
          color: #fff;
          border-radius: 50%;
          background: red;
        }
      }
    }
  }

  .tips-score {
    margin: 20rpx;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    height: 60rpx;
    background: #e5f6ea;
    border-radius: 10rpx;

    .tips-score-item {
      font-weight: 500;
      font-size: 28rpx;
      color: #333333;
      line-height: 28rpx;
    }

    .tips-score-line {
      color: #979797;
    }
  }

  .perfect-tabs {
    margin: 20rpx;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0;

    .tabs-item {
      width: 20%;
      height: 60rpx;
      line-height: 60rpx;
      text-align: center;
      font-weight: 400;
      font-size: 26rpx;
      color: #666666;
      background: #ffffff;
      border: 0.5rpx solid #0fa291;
      border-right: 0;

      &:first-child {
        border-radius: 10rpx 0rpx 0rpx 10rpx;
      }

      &:last-child {
        border-radius: 0 10rpx 10rpx 0;
        border-right: 0.5rpx solid #0fa291;
      }
    }

    .on {
      font-weight: 500;
      color: #0fa291;
      background: #e7f5f4;
    }

    transition: all 0.3s ease-in-out;
  }

  .tabs-fixed {
    position: fixed;
    top: 190rpx;
    left: 0;
    z-index: 300;
    margin: 0;
    // padding: 0 20rpx;
    width: 100%;
    box-shadow: 0 0 15rpx 5rpx #ccc;
  }

  .section {
    margin: 20rpx;
    background: #fff;
    border-radius: 20rpx;

    .section-title {
      display: flex;
      align-items: center;
      padding-left: 20rpx;
      height: 92rpx;
      line-height: 92rpx;
      font-weight: 500;

      .title-line {
        margin-right: 10rpx;
        display: inline-block;
        width: 8rpx;
        height: 32rpx;
        background: #0fa291;
        border-radius: 4rpx;
      }

      .work-add {
        margin-left: auto;
        margin-right: 20rpx;
        padding: 8rpx 16rpx;
        color: #0fa291;
        font-size: 24rpx;
        line-height: 24rpx;
        font-weight: 500;
        background: #e7f5f4;
        border-radius: 32rpx;
        border: 1rpx solid #0fa291;
      }
    }

    .work-box {
      border-bottom: 2rpx dashed #ccc;

      &:last-child {
        border-bottom: none;
      }
    }

    ::v-deep {
      .form-item {
        box-sizing: border-box;
        position: relative;
        margin: 0 20rpx;
        padding: 20rpx 0;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        flex-wrap: wrap;
        min-height: 100rpx;
        border-top: 1rpx solid #ebebed;
  
        .label {
          width: 140rpx;
          font-size: 28rpx;
          color: #333333;
          display: flex;
          align-items: center;
          .justify {
            width: 112rpx;
            text-align-last: justify;
          }
        }
        .data {
          flex: 1;
          display: flex;
          justify-content: space-between;
          align-items: center;
          .pla_text {
            font-size: 24rpx;
            color: #CCCCCC;
          }
        }
        .icon {
          transition: all 0.3s;
          &.open {
            transform: rotate(-90deg);
          }
        }
      }
    }
    .form-item {
      box-sizing: border-box;
      position: relative;
      margin: 0 20rpx;
      padding: 20rpx 0;
      display: flex;
      justify-content: flex-start;
      align-items: center;
      flex-wrap: wrap;
      min-height: 100rpx;
      border-top: 1rpx solid #ebebed;

      .label {
        width: 140rpx;
        font-size: 28rpx;
        color: #333333;
        display: flex;
        align-items: center;
        .justify {
          width: 112rpx;
          text-align-last: justify;
        }
      }
      .data {
        flex: 1;
        display: flex;
        justify-content: space-between;
        align-items: center;
        .pla_text {
          font-size: 24rpx;
          color: #CCCCCC;
        }
      }

      input {
        font-size: 28rpx;
        color: #333333;
      }

      .placeholder {
        color: #ccc;
        font-size: 24rpx;
      }

      /deep/ .uni-input-input {
        font-size: 28rpx;
      }

      /deep/ .u-textarea {
        padding: 0;
      }
      /deep/ .uni-textarea-textarea {
        font-size: 28rpx;
        color: #000;
      }

      .pr80 {
        /deep/.u-textarea__field {
          height: 160rpx !important;
        }
      }

      /deep/ .u-textarea__count {
        bottom: -36rpx;
        padding: 5rpx 13rpx;
        background-color: #ebebed !important;
      }

      .form-btn {
        margin-right: 18rpx;
        display: inline-block;
        width: 158rpx;
        height: 48rpx;
        line-height: 48rpx;
        text-align: center;
        font-size: 24rpx;
        color: #666;
        background: #fff;
        border: 1rpx solid #999;
        border-radius: 13rpx;
      }

      .arrow-right {
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        width: 28rpx;
        height: 28rpx;
        transition: all 0.3s ease-in-out;
        // transform-origin: 50% 50%;
      }
      
      .icon {
        transition: all 0.3s ease-in-out;
      }
      .open {
        transform: rotate(-90deg);
      }

      .seclector-box {
        position: absolute;
        top: 90%;
        left: 0;
        z-index: 13;
        padding: 20rpx 4rpx;
        display: flex;
        flex-wrap: wrap;
        background: #f5f7f9;
        border: 1rpx solid #ebebed;
        border-radius: 10rpx;
        box-shadow: 0rpx 10rpx 20rpx 0rpx rgba(24, 97, 93, 0.1);
        transition: all 0.3s ease-in-out;

        .work-btn {
          margin: 10rpx;
          display: inline-block;
          width: 140rpx;
          height: 60rpx;
          line-height: 60rpx;
          text-align: center;
          font-size: 24rpx;
          color: #666;
          background: #fff;
          border: 1rpx solid #999;
          border-radius: 13rpx;
        }

        .checked {
          position: relative;
          color: #0fa291;
          background: #e7f5f4;

          &:after {
            content: '';
            position: absolute;
            bottom: 0;
            right: 0;
            width: 28rpx;
            height: 28rpx;
            background: url('https://pic.bangbangtongcheng.com/static/bbzc/checked-tag.png') center
              no-repeat;
            background-size: 100% 100%;
          }
        }
      }

      .tag-item {
        margin: 5rpx;
        padding: 8rpx 20rpx;
        max-height: 40rpx;
        line-height: 24rpx;
        color: #666;
        font-size: 24rpx;
        background: #f5f7f9;
        border-radius: 4rpx;
      }

      .center-section {
        margin: 0 auto;
        width: 710rpx;
        background: #ffffff;
        border-radius: 20rpx;

        .content-title {
          display: flex;
          justify-content: space-between;
          align-items: center;

          .content-title-right {
            display: flex;
            align-items: center;
            color: #0fa291;
            font-size: 24rpx;
          }
        }

        .content-tip {
          margin: 20rpx 0;
          font-size: 24rpx;
          color: #e00201;
        }
      }

      .skill-img {
        margin-top: 10rpx;
      }

      /* 放在form-item 样式最后，用户覆盖未选中样式*/
      .checked {
        position: relative;
        color: #0fa291;
        background: #e7f5f4;

        &:after {
          content: '';
          position: absolute;
          bottom: 0;
          right: 0;
          width: 28rpx;
          height: 28rpx;
          background: url('https://pic.bangbangtongcheng.com/static/bbzc/checked-tag.png') center
            no-repeat;
          background-size: 100% 100%;
        }
      }

      /* form-item 结束*/
    }


    .center_item {
      // height: 100rpx;
      // width: 670rpx;
      // display: flex;
      // align-items: center;
      // border-bottom: 1px solid #e0e0e0;
      // position: relative;

      /deep/ uni-picker {
        flex: 1;
      }

      .heixian {
        // width: 40rpx;
        // height: 2px;
        // background-color: #000;
        margin-right: 100rpx;
      }

      .salary {
        flex: 1;
        display: flex;
        align-items: center;
        padding-right: 40rpx;

        .salary_input {
          width: 150rpx;
          height: 60rpx;
          padding: 10rpx;
          border-radius: 8rpx;
          border: 1px solid #999999;
        }

        .salary_span {
          font-size: 34rpx;
          font-weight: normal;
          color: #333333;
          margin: 0 14rpx;
        }
      }

      .center_item_span {
        font-size: 28rpx;
        color: #333;
        margin-right: 40rpx;
        // margin-left: 22rpx;
      }

      .image_yjt {
        width: 48rpx;
        height: 48rpx;
      }

      .input {
        flex: 1;
        font-size: 28rpx;
        color: #333333;
        margin-right: 70rpx;
      }

      .kuang {
        position: relative;
        flex: 1;
        min-height: 160rpx;
        margin: 0 40rpx;
        padding-bottom: 40rpx;
        background-color: #fff;
        border: 1px solid #c9c9c9;

        textarea {
          width: 100%;
          padding-left: 24rpx;
          padding-top: 14rpx;
          line-height: 50rpx;
          letter-spacing: 2rpx;
          font-size: 28rpx;
        }

        p {
          position: absolute;
          bottom: 20rpx;
          right: 20rpx;
          color: #999999;
        }
      }

      .image {
        width: 48rpx;
        height: 48rpx;
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
      }
    }

    .content-wrap {
      padding-bottom: 30rpx;
      background: linear-gradient(180deg, #ffffff 0%, #e7f5f4 100%);
      border-radius: 0rpx 0rpx 20rpx 20rpx;

      .content {
        margin: 0 20rpx;
        border-radius: 10rpx;

        .bonusItem-title {
          display: flex;
          justify-content: space-between;
          align-items: center;
          height: 100rpx;
		  font-weight: 500;

          .bonusItem-add {
            margin-left: auto;
            padding: 8rpx 16rpx;
            font-size: 24rpx;
            line-height: 24rpx;
            font-weight: 500;
            color: #fff;
            background: #0fa291;
            border-radius: 32rpx;
          }
        }

        .bonusItem-box {
          background: #fff;
          border-bottom: 2rpx dashed #ccc;

          &:last-child {
            border-bottom: none;
          }
        }
      }
    }

    .my-photo {
      position: absolute;
      top: 30rpx;
      right: 0;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      width: 200rpx;
      height: 220rpx;
      text-align: center;
      background: #fff;

      .uploadPhotos {
        height: 150rpx;
        width: 150rpx;

        .Photos {
          height: 152rpx;
          width: 152rpx;
          position: relative;

          .image {
            width: 100%;
            height: 100%;
          }

          ::v-deep .solids {
            width: 100%;
            height: 100%;
            margin: 0;

            &::after {
              border: none;
            }
          }

          ::v-deep .grid.grid-square {
            height: 100%;

            .bg-img {
              width: 100%;
              height: 100%;
              margin-bottom: 0;
              margin-right: 0;
              padding-bottom: 0;
            }
          }

          .colse {
            position: absolute;
            top: 0;
            right: 0;
            background-color: #f0f0f0;
            border-radius: 0 8rpx 0 8rpx;
          }

          .Photos_close {
            border-bottom-left-radius: 6rpx;
            padding: 6rpx 12rpx;
            height: auto;
            background-color: rgba(0, 0, 0, 0.5);
            color: #fff;
            position: absolute;
            top: 0;
            right: 0;
          }

          .cCircle {
            // background: rgba(0,0,0,0.5);
            width: 120rpx;
            height: 120rpx;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
          }

          .maskimg {
            background: rgba(0, 0, 0, 0.5);
            width: 100%;
            height: 100%;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
          }

          .hide1 {
            animation: change 3s;
          }

          @keyframes change {
            0% {
              opacity: 1;
            }

            100% {
              opacity: 0;
            }
          }
        }

        .zhaop {
          width: 150rpx;
          height: 150rpx;
          background-color: #ffffff;
          border-radius: 8rpx;
          border: 1px solid #e0e0e0;
          display: flex;
          align-items: center;
          justify-content: center;

          .image {
            width: 48rpx;
            height: 48rpx;
          }
        }
      }

      .photo-btn {
        margin-top: 30rpx;
        text-align: center;
        color: #999;
        font-size: 24rpx;
      }
    }
  }

  .center {
    margin: 0 auto;
    padding: 30rpx 20rpx;
    width: 710rpx;
    background-color: #fff;
    border-radius: 20rpx;

    .center_items {
      height: 97rpx;
      width: 670rpx;
      align-items: center;
      border-bottom: 1px solid #e0e0e0;
      position: relative;

      /deep/ uni-picker {
        flex: 1;
      }

      .center_item_span {
        font-size: 34rpx;
        font-weight: 600;
        color: #000000;
        margin-right: 40rpx;
        margin-left: 22rpx;
        margin-bottom: 20rpx;
      }

      .input {
        flex: 1;
        font-size: 34rpx;
        color: #333333;
        margin-right: 70rpx;
      }

      .kuang {
        position: relative;
        flex: 1;
        min-height: 160rpx;
        padding-bottom: 60rpx;
        background-color: #fff;
        border: 1px solid #e0e0e0;

        textarea {
          width: 100%;
          padding-left: 24rpx;
          padding-top: 14rpx;
          line-height: 50rpx;
          letter-spacing: 2rpx;
        }

        p {
          position: absolute;
          bottom: 20rpx;
          right: 20rpx;
          color: #999999;
        }
      }

      .image {
        width: 48rpx;
        height: 48rpx;
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
      }
    }

    .center_item {
      height: 97rpx;
      width: 670rpx;
      display: flex;
      align-items: center;
      border-bottom: 1px solid #e0e0e0;
      position: relative;

      /deep/ uni-picker {
        flex: 1;
      }

      .heixian {
        // width: 40rpx;
        // height: 2px;
        // background-color: #000;
        margin-right: 100rpx;
      }

      .salary {
        flex: 1;
        display: flex;
        align-items: center;
        padding-right: 40rpx;

        .salary_input {
          width: 150rpx;
          height: 60rpx;
          padding: 10rpx;
          border-radius: 8rpx;
          border: 1px solid #999999;
        }

        .salary_span {
          font-size: 34rpx;
          font-weight: normal;
          color: #333333;
          margin: 0 14rpx;
        }
      }

      .center_item_span {
        font-size: 28rpx;
        color: #333;
        margin-right: 40rpx;
        margin-left: 22rpx;
      }

      .image_yjt {
        width: 48rpx;
        height: 48rpx;
      }

      .input {
        flex: 1;
        font-size: 28rpx;
        color: #333333;
        margin-right: 70rpx;
      }

      .kuang {
        position: relative;
        flex: 1;
        min-height: 160rpx;
        margin: 0 40rpx;
        padding-bottom: 40rpx;
        background-color: #fff;
        border: 1px solid #c9c9c9;

        textarea {
          width: 100%;
          padding-left: 24rpx;
          padding-top: 14rpx;
          line-height: 50rpx;
          letter-spacing: 2rpx;
        }

        p {
          position: absolute;
          bottom: 20rpx;
          right: 20rpx;
          color: #999999;
        }
      }

      .image {
        width: 48rpx;
        height: 48rpx;
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
      }
    }
  }

  .btn {
    position: fixed;
    bottom: 80rpx;
    left: 50%;
    transform: translateX(-50%);
    width: 710rpx;
    height: 100rpx;
    background-color: #0fa291;
    border-radius: 50rpx;
    font-size: 32rpx;
    font-weight: 400;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .submit-box {
    width: 100%;
    background: #f5f7f9;
    padding-bottom: calc(env(safe-area-inset-bottom) / 2);

    .submit-txt {
      margin: 20rpx 0;
      display: flex;
      justify-content: center;
      align-items: center;
      width: 100%;
      font-size: 24rpx;

      .checkbox {
        margin-right: 10rpx;
        width: 28rpx;
        height: 28rpx;
        border-radius: 8rpx;
      }

      .agree {
        display: flex;
        justify-content: center;
        align-items: center;
        background: #0fa291;
        border: 1rpx solid #0fa291;
      }

      .reject {
        background: #ddd;
        border: 1rpx solid #999;
      }
    }

    .submit-btn {
      margin: 0 auto;
      margin-bottom: 20rpx;
      width: 710rpx;
      text-align: center;
      line-height: 100rpx;
      font-size: 32rpx;
      font-weight: 500;
      color: #fff;
      background: #0fa291;
      border-radius: 50rpx;
    }
  }

  .pop {
    padding: 30rpx 20rpx;
    background: #fff;
    border-radius: 30rpx 30rpx 0 0;

    .pop-title {
      position: relative;
      margin-bottom: 30rpx;
      text-align: center;

      .title {
        font-weight: 500;
        font-size: 32rpx;
        color: #000000;
      }

      .close {
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        width: 30rpx;
        height: 30rpx;
      }
    }

    .pop-content {
      padding: 20rpx;
      width: 710rpx;
      line-height: 52rpx;
      color: #333;
      font-size: 28rpx;
      background: #f5f7f9;
      border-radius: 10rpx;
    }

    .pop-btn {
      margin: 30rpx 0;
      display: flex;
      justify-content: space-between;
      align-items: center;
      width: 100%;
      box-sizing: border-box;

      & > view {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 325rpx;
        height: 90rpx;
        border-radius: 45rpx;

        & > img {
          width: 32rpx;
          height: 32rpx;
        }
      }

      .btn-on {
        color: #fff;
        background: #0fa291;

        & > img {
          margin-right: 20rpx;
        }
      }

      .btn-off {
        color: #0fa291;
        background: #e7f5f4;
        border: 1rpx solid #0fa291;

        & > img {
          margin-right: 32rpx;
        }
      }
    }
  }

  .bindPublicSuccess_frame {
    overflow: hidden;
    padding: 30rpx 20rpx;
    width: 600rpx;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10rpx;
    font-weight: 500;
    color: #ffffff;
    line-height: 40rpx;

    image {
      margin-right: 10rpx;
      width: 28rpx;
      height: 28rpx;
    }

    .binds_frame_t {
      margin-bottom: 19rpx;
      display: flex;
      justify-content: center;
      align-items: center;
      font-size: 32rpx;
    }

    .binds_frame_c {
      text-align: left;
      font-size: 24rpx;
      white-space: nowrap;
      text-align: center;
    }
  }

  .bindAddFL_frame {
    background-color: #ffffff;
    width: 600rpx;
    height: 250rpx;
    border-radius: 10rpx;
    padding: 28rpx 32rpx 10rpx 32rpx;

    .title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 34rpx;

      .title_center {
        font-size: 30rpx;
        font-weight: 400;
        color: #000000;
      }

      .title_right {
        width: 32rpx;
        height: 32rpx;

        .image {
          width: 100%;
          height: 100%;
        }
      }
    }

    .center {
      width: 540rpx;
      height: 60rpx;
      border-radius: 8rpx;
      border: 1px solid #999999;
      position: relative;

      .inputs {
        position: absolute;
        top: 0;
        left: 0;
        padding: 4rpx 10rpx;
        display: inline-block;
        width: 100%;
        height: inherit;
        min-height: auto;
        overflow: visible;
      }

      .inputs_zis {
        position: absolute;
        right: 10rpx;
        top: 50%;
        transform: translateY(-50%);
      }
    }

    .bottoms {
      width: 100%;
      height: 80rpx;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 32rpx;
      font-weight: 400;
      color: #0fa291;
    }
  }
  /deep/ .u-upload__wrap__preview__image,
  /deep/ .u-upload__button {
    width: 140rpx !important;
    height: 150rpx !important;
  }

  /deep/ .u-upload__button {
    margin-right: 0;
  }

  /deep/ .u-upload__wrap__preview:nth-child(4n) {
    margin-right: 0;
  }

  /*loading 样式开始 */
  .dengLoadingVue {
    .maskVueHiddenShow {
      z-index: 999999;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: rgb(255, 255, 255);
      display: flex;
      align-items: center;
      justify-content: center;

      .maskVueHiddenShowWrapper {
        width: 80%;
        height: 300rpx;
        position: fixed;
        top: 15%;
        left: 50%;
        transform: translateX(-50%);
        animation: 0.5s;

        .loding {
          width: 100%;
          text-align: center;
          position: absolute;
          bottom: 0;
          left: 50%;
          transform: translateX(-50%);
        }
      }
    }
  }

  .arrow-right1 {
    position: absolute;
    top: 50%;
    right: 200rpx;
    transform: translateY(-50%);
    width: 28rpx;
    height: 28rpx;
    transition: all 0.3s ease-in-out;
  }

  .arrow-right2 {
    position: absolute;
    top: 50%;
    right: 50rpx;
    transform: translateY(-50%);
    width: 28rpx;
    height: 28rpx;
    transition: all 0.3s ease-in-out;
  }

  .arrow-right3 {
    position: absolute;
    // top: 50%;
    right: 50rpx;
    // transform: translateY(-50%);
    width: 28rpx;
    height: 28rpx;
    transition: all 0.3s ease-in-out;
  }
  .loader {
    position: absolute;
    top: calc(50% - 32px);
    left: calc(50% - 32px);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    perspective: 800px;
  }

  .inner {
    position: absolute;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    border-radius: 50%;
  }

  .inner.one {
    left: 0%;
    top: 0%;
    animation: rotate-one 1s linear infinite;
    border-bottom: 3px solid #64b6a8;
  }

  .inner.two {
    right: 0%;
    top: 0%;
    animation: rotate-two 1s linear infinite;
    border-right: 3px solid #64b6a8;
  }

  .inner.three {
    right: 0%;
    bottom: 0%;
    animation: rotate-three 1s linear infinite;
    border-top: 3px solid #64b6a8;
  }

  @keyframes rotate-one {
    0% {
      transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg);
    }

    100% {
      transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg);
    }
  }

  @keyframes rotate-two {
    0% {
      transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg);
    }

    100% {
      transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg);
    }
  }

  @keyframes rotate-three {
    0% {
      transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg);
    }

    100% {
      transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg);
    }
  }

  @keyframes maskVueHiddenShowWrapper {
    0% {
      width: 80%;
    }

    100% {
      width: 0;
    }
  }

  /*loading 样式结束 */
</style>
